{"name":"get-urls","version":"12.0.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","re2":"^1.19.1","url-regex-safe":"^3.0.0"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.28.1","xo":"^0.55.0"},"types":"./index.d.ts","gitHead":"1e5b73361dfe437ae1ff4bff765606fa6ce15d4d","bugs":{"url":"https://github.com/sindresorhus/get-urls/issues"},"homepage":"https://github.com/sindresorhus/get-urls#readme","_id":"get-urls@12.0.0","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-KSFrh5MpC8fGgN56AdweSNFyi0Y7xkBumYPTB4JkL86Nq3CYJG0hkeqELgfgxEM9EdaxauLJOYStHWiFuDCI7g==","shasum":"08ddbe06f94da32313662cc7e11ab7759073ffa8","tarball":"http://registry-npm.ywwl.com/get-urls/download/get-urls-12.0.0.tgz","fileCount":5,"unpackedSize":6151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzRj/xQh4HpKGZpBUyxWv3pSh6F2aG5z9/IZclPsGePAIhAJoQ5SnxfImKSNW99oEIHebsrTwhMdloXFaN96Ag4P0p"}],"size":2657,"noattachment":false,"key":"/get-urls/-/get-urls-12.0.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.0.0_1689438380420_0.8290449467605245"},"_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":1689438380591,"_cnpm_publish_time":1689438380591,"dist-tags":{"latest":"12.1.0"}}