Get all URLs in a string
The URLs will be normalized.
$ npm install --save get-urls
const text = 'Lorem ipsum dolor sit amet, //sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';
getUrls(text);
//=> Set {'http://sindresorhus.com', 'http://yeoman.io'}
Returns a Set
of URLs.
Type: string
Type: Object
See the normalize-url
options.
- get-urls-cli - CLI for this module
- linkify-urls - Linkify URLs in text
- url-regex - Regular expression for matching URLs
MIT © Sindre Sorhus