{"name":"get-urls","version":"11.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":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["get","urls","url","extract","find","scrape","text","string"],"dependencies":{"normalize-url":"^7.0.2","re2":"^1.17.2","url-regex-safe":"^3.0.0"},"devDependencies":{"ava":"^4.0.1","tsd":"^0.19.1","xo":"^0.47.0"},"types":"./index.d.ts","gitHead":"ea55b5a092bcb5e4be9deba995143cf702bf7515","bugs":{"url":"https://github.com/sindresorhus/get-urls/issues"},"homepage":"https://github.com/sindresorhus/get-urls#readme","_id":"get-urls@11.0.0","_nodeVersion":"14.17.5","_npmVersion":"8.1.0","dist":{"integrity":"sha512-rxTvv9HszwTtPfN7oRGVTVn7aPmvLKGqY41SFpMyKan65un/nZHWhqmD+URmnCG7w/B+IFqKw1lWzYfxgfFLEw==","shasum":"59174f47ceb82726c814042ab8db3aec2634ff4b","tarball":"http://registry-npm.ywwl.com/get-urls/download/get-urls-11.0.0.tgz","fileCount":5,"unpackedSize":6236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4p4hCRA9TVsSAnZWagAAbcsP/2gNvbKUQJKdjl/G4Uqr\nXblqTnJ6GR1M7Yr2vNX5cxWa6sqzk3d54Y0pQvlVcG9UHLrnJn8Wc7sD1vxq\nj7FZS9I/9o9VIf+dlWXe4+ErxLGTgqxPDiRQrsc7eK9Fvwp1EzzCT1RhVuHZ\nYq19wo/cIG0OSKc0+cFvdDVeoAQQq13sVSqaFSF9IujmzAwfXhf0cw9pK41E\nTy6HnNe/IR1eYpuBxALSxKDsCxySJMdjUuwU45HD9SyXpGwqMurM6aoXVXsT\nZMCcW5uLOBMG23HhyTJT894wQhTTE5GYhCRTfJrJZCZxbNIA/PhGffhC9M+V\nA2yG1i8jRSJrJ1IUdFe99QnXGXYnDy3QGpcDPARpvzguo0lrjnCCpgjIYRhS\ntxJE6DdDY+1e0+4bFdymZYSJ9SnCks7nuARWhoMk/PcccJElLpgHwSPOp71v\nwy7KX4lwbUX2Rx3ZlOZRPCKJtOlyBtu+igOEHiR/dRQ/wAP9f0a2FH9vpgXA\nvfjltOWZMmY3MhIFGKb0dfCEs7kIdOVYRSHxXEwjeNiJ1wQ7q8JHYavIxZr6\nYKGAnzh1Vq2K9cwrJIT4wsbL1M1OZA6khEHAjSqqvHt8ggRYmtDG2uFP2yZ3\nVTG+eP/dnSj9jUHoQWGRsKRuFs+dfeQ0PFnOSIPgPEASAgMTVZEbhMyHgiQ/\nLUYo\r\n=IHks\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0xJtC8zZbANj57BPhwJWyR8K3o0txHrJn2swWcjnE6AiA1BHBUVvgm8DEJu2kR4UrQHYZ2SvGfutdK9DCp7TkPSw=="}],"size":2701,"noattachment":false,"key":"/get-urls/-/get-urls-11.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_11.0.0_1642241569130_0.13008184719106564"},"_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":1642241569285,"_cnpm_publish_time":1642241569285,"dist-tags":{"latest":"12.1.0"}}