# html-link-extractor

> extracts links from html text

Latest version **1.0.5** (published 2022-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install html-link-extractor
pnpm add html-link-extractor
yarn add html-link-extractor
bun add html-link-extractor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-05-04 |
| First published | 2022-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Thomas Cort |
| Maintainers | tcort |
| Keywords | html, link, extractor, href |

## Links

- npm: https://www.npmjs.com/package/html-link-extractor
- Repository: https://github.com/tcort/html-link-extractor
- Homepage: https://github.com/tcort/html-link-extractor#readme
- Issues: https://github.com/tcort/html-link-extractor/issues
- npm.io page: https://npm.io/package/html-link-extractor

## Dependencies (1)

- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.10

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-05-04
- 1.0.4 — 2022-05-04
- 1.0.3 — 2022-05-04
- 1.0.2 — 2022-05-04
- 1.0.1 — 2022-05-04
- 1.0.0 — 2022-04-24

## README

# html-link-extractor

Extracts links from html texts.

## Installation
```bash
$ npm install --save html-link-extractor
```
## API

### htmlLinkExtractor(html)

Parameters:

* `html` text in html format.

Returns:

* an array of URLs
## Examples

```js
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](https://github.com/tcort/html-link-extractor/blob/master/LICENSE.md)

---
_Source: https://npm.io/package/html-link-extractor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
