html-link-extractor
v1.0.5
Published
extracts links from html text
Readme
html-link-extractor
Extracts links from html texts.
Installation
$ npm install --save html-link-extractorAPI
htmlLinkExtractor(html)
Parameters:
htmltext 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 testLicense
See LICENSE.md
