{"name":"get-urls","version":"10.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"},"engines":{"node":">=10.12.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["get","urls","url","extract","find","scrape","text","string"],"dependencies":{"normalize-url":"^5.1.0","url-regex-safe":"^1.0.2"},"devDependencies":{"ava":"^2.4.0","tsd":"^0.13.1","xo":"^0.33.0"},"gitHead":"80d0116fa1bd102121973539d309f2afc482ea70","bugs":{"url":"https://github.com/sindresorhus/get-urls/issues"},"homepage":"https://github.com/sindresorhus/get-urls#readme","_id":"get-urls@10.0.0","_nodeVersion":"10.22.0","_npmVersion":"6.14.7","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-ssCMAvuD5A8PzcYCdeyodjbf1v8XF2lMuhSCQbgsvCC7Uha0S8xGwBG/5/afMWsdBR7jOry/kd8Iq5P1ML5tww==","shasum":"02b1e26231015ed60164b4e1675f43bec37c50b2","tarball":"http://registry-npm.ywwl.com/get-urls/download/get-urls-10.0.0.tgz","fileCount":5,"unpackedSize":6143,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSkY4CRA9TVsSAnZWagAAEt4P+QBeeiEjvpxQoQd+fPnm\n0t/YLVHXnLdgBPugEcRIRhi5tk/bBvdFyJXtFgXQ4oN1RwBHgGQfg6XMGzjJ\n1jXpqGs7tc5J4j/cPkjrv4/Jlwzc/Bpuy7379RPM+VI0aL48+RN88xPECfss\nwj+3f+GRvAHI0nMPScmfLNsLZFhqkLy/VYn5Yuzd+EvIvvJDtAcZV/HbwLfF\nFn+NHinlOBV7zRrcOLy6F6WDFuzs+ftt3tlgY0XqHaV1fgZhZG+vuGWWGr1F\nUx2/fgbHtIa0YsLu/MfsvntzsGXJeuLFwr3dgbJX2fwTGiHVJTr3lecx18B9\n6AGACDtpOKWngoBXj/8Q74+qcTTdWPOOmoUfxN1mVsV77WtUuWzJgKkAcbCg\nZqow65DWCyWzwUcLdNhr+gOEuYUZWJyVF/QM8iBURNux4cj9dkgaT7KHUgy6\nNYemxrNN337209usxA7mZIDOLQ4fvjyXpHq/gq7FTsnXwz1Oasu+8e21YFzr\n1l/njQbOXf6IS3itD32egUBalMXDy0/ksQcKtFvR/vdHiwVMeHNs5DrvqYW9\nBEfSiXviyp2RmnaCA4/STPxEfpKeIxwdw4a8n10fpPS7UZjeKmsaZl1fvo0C\nq79IxYFsnK52pi8sB7HBU2PjHPzzA3W5jrBonUGXdEMqwHmOGr9Znjvl9Rx3\nFqCw\r\n=LcTo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA909VU724QTzjACptxAtfF8a0uzza/r3kMddkF52ZsVAiEA3VZduMc0e6VoKpvtW2yiS/U0QcaAeaaexmd1RNMh01w="}],"size":2710,"noattachment":false,"key":"/get-urls/-/get-urls-10.0.0.tgz"},"maintainers":[{"email":"sindresorhus@gmail.com","name":"sindresorhus"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-urls_10.0.0_1598703159699_0.8959009200466643"},"_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":1598703159854,"_cnpm_publish_time":1598703159854,"dist-tags":{"latest":"12.1.0"}}