# extract-html-id

> Extract all ids from html

Latest version **1.0.0** (published 2017-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install extract-html-id
pnpm add extract-html-id
yarn add extract-html-id
bun add extract-html-id
```

## 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.0 |
| Published | 2017-10-03 |
| First published | 2017-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | s3ththompson |
| Keywords | html, id, extract, regex |

## Links

- npm: https://www.npmjs.com/package/extract-html-id
- Repository: https://github.com/s3ththompson/extract-html-id
- Homepage: https://github.com/s3ththompson/extract-html-id#readme
- Issues: https://github.com/s3ththompson/extract-html-id/issues
- npm.io page: https://npm.io/package/extract-html-id

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-10-03

## README

# extract-html-id [![stability][0]][1]
[![npm version][2]][3] [![build status][4]][5]
[![downloads][8]][9] [![js-standard-style][10]][11]

Extract all ids from html

## Usage
```js
var extract = require('extract-html-id')
var assert = require('assert')

var html = `
  <div id="foo">
    <p id="bar">hello planet</p>
  </div>
`
var expected = [ 'foo', 'bar']
assert.deepEqual(extract(html), expected, 'array was same')
```

## API
### `ids = extract(html)`
Get an array of ids for the given string. Uses a regex so safe to run on
non-html strings too. Returns the first ID per DOM element. Returns an empty array if no matches are found.

## License
[MIT](https://tldrlegal.com/license/mit-license)

[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/extract-html-id.svg?style=flat-square
[3]: https://npmjs.org/package/extract-html-id
[4]: https://img.shields.io/travis/s3ththompson/extract-html-id/master.svg?style=flat-square
[5]: https://travis-ci.org/s3ththompson/extract-html-id
[6]: https://img.shields.io/codecov/c/github/s3ththompson/extract-html-id/master.svg?style=flat-square
[7]: https://codecov.io/github/s3ththompson/extract-html-id
[8]: http://img.shields.io/npm/dm/extract-html-id.svg?style=flat-square
[9]: https://npmjs.org/package/extract-html-id
[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[11]: https://github.com/feross/standard

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