get-urls-to-array

1.0.0 • Public • Published

get-urls Build Status

Get all URLs in a string

The URLs will be normalized.

Install

$ npm install --save get-urls

Usage

const text = 'Lorem ipsum dolor sit amet, //sindresorhus.com consectetuer adipiscing http://yeoman.io elit.';
 
getUrls(text);
//=> Set {'http://sindresorhus.com', 'http://yeoman.io'}

API

getUrls(text, [options])

Returns a Set of URLs.

text

Type: string

options

Type: Object

See the normalize-url options.

Related

License

MIT © Sindre Sorhus

/get-urls-to-array/

    Package Sidebar

    Install

    npm i get-urls-to-array

    Weekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • rohmanhm