html-link-extractor
extracts links from html text
Last updated 3 years ago by tcort .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install html-link-extractor 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.5                                ...           latest (3 years ago)

6 Versions

  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE