html-link-extractor

1.0.5 • Public • Published

html-link-extractor

Extracts links from html texts.

Installation

$ npm install --save html-link-extractor

API

htmlLinkExtractor(html)

Parameters:

  • html text in html format.

Returns:

  • an array of URLs

Examples

const { readFileSync } = require('fs');
const htmlLinkExtractor = require('html-link-extractor');

const html = readFileSync('index.html', {encoding: 'utf8'});

const links = htmlLinkExtractor(html);
links.forEach(link => console.log(link));

Testing

npm test

License

See LICENSE.md

Readme

Keywords

Package Sidebar

Install

npm i html-link-extractor

Weekly Downloads

47,939

Version

1.0.5

License

MIT

Unpacked Size

4.35 kB

Total Files

7

Last publish

Collaborators

  • tcort