Skip to content

Instantly share code, notes, and snippets.

@jgwill
Created December 11, 2018 15:58
Show Gist options
  • Save jgwill/d1dc9b6263396ab83ad953c434ce2935 to your computer and use it in GitHub Desktop.
Save jgwill/d1dc9b6263396ab83ad953c434ce2935 to your computer and use it in GitHub Desktop.
How do I extract url in content using nodejs?
const text = 'Lorem ipsum dolor sit amet, //sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';
getUrls(text);
//=> Set {'http://sindresorhus.com', 'http://yeoman.io'}
npm i get-urls --save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment