$ npm install html-link-extractor
Extracts links from html texts.
$ npm install --save html-link-extractor
Parameters:
html
text in html format.Returns:
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));
npm test
See LICENSE.md
© 2010 - cnpmjs.org x YWFE | Home | YWFE