{"name":"get-urls","version":"12.1.0","description":"Get all URLs in a string","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/get-urls.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["get","urls","url","extract","find","scrape","text","string"],"dependencies":{"normalize-url":"^8.0.0","super-regex":"^0.2.0","url-regex-safe":"^4.0.0"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.28.1","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"73834dff3a59f5cca99f782d74cc65a20a8b4333","bugs":{"url":"https://github.com/sindresorhus/get-urls/issues"},"homepage":"https://github.com/sindresorhus/get-urls#readme","_id":"get-urls@12.1.0","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-qHO+QmPiI1bEw0Y/m+WMAAx/UoEEXLZwEx0DVaKMtlHNrKbMeV960LryIpd+E2Ykb9XkVHmVtpbCsmul3GhR0g==","shasum":"dde64806ed42f18a3c1a9b8e7e6673f6eb89801a","tarball":"http://registry-npm.ywwl.com/get-urls/download/get-urls-12.1.0.tgz","fileCount":5,"unpackedSize":6305,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOoR/O53phTdDeuzhdtYGds4UWGhYbXeRCwuBSfyYn5gIgGIyifKfUeEpv5MiCmyU2d4/HMnh4TsFv+JlYPOtoR+w="}],"size":2718,"noattachment":false,"key":"/get-urls/-/get-urls-12.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-urls_12.1.0_1692123676770_0.40001634650183826"},"_hasShrinkwrap":false,"readme":"# get-urls\n\n> Get all URLs in a string\n\nThe URLs will be [normalized](https://github.com/sindresorhus/normalize-url).\n\n*Do not use this for any kind of security-related validation.*\n\nPlease note the [known limitation](https://github.com/niftylettuce/url-regex-safe#limitations). You can work around this by setting `requireSchemeOrWww` to `true`.\n\n## Install\n\n```sh\nnpm install get-urls\n```\n\n## Usage\n\n```js\nimport getUrls from 'get-urls';\n\nconst text = 'Lorem ipsum dolor sit amet, //sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';\n\ngetUrls(text);\n//=> Set {'http://sindresorhus.com', 'http://yeoman.io'}\n```\n\n## API\n\n### getUrls(text, options?)\n\nReturns a `Set` of URLs.\n\n### text\n\nType: `string`\n\n### options\n\nType: `object`\n\nAll the `normalize-url` [options](https://github.com/sindresorhus/normalize-url#options) in addition to:\n\n#### extractFromQueryString\n\nType: `boolean`\\\nDefault: `false`\n\nExtract URLs that appear as query parameters in the found URLs.\n\n#### exclude\n\nType: `string[]`\\\nDefault: `[]`\n\nExclude URLs that match URLs in the given array.\n\n#### requireSchemeOrWww\n\nType: `boolean`\\\nDefault: `false`\n\nRequire URLs to have a scheme or leading `www.` to be considered an URL. When `false`, matches against a list of valid TLDs, so it will match URLs like `unicorn.education`.\n\nDoes not affect URLs in query parameters if using the `extractFromQueryString` option.\n\n## Related\n\n- [get-urls-cli](https://github.com/sindresorhus/get-urls-cli) - CLI for this module\n- [linkify-urls](https://github.com/sindresorhus/linkify-urls) - Linkify URLs in text\n","publish_time":1692123676939,"_cnpm_publish_time":1692123676939,"dist-tags":{"latest":"12.1.0"}}