# gulp-head-picker

> gulp plugin to extract heading elements from HTML string.

Latest version **0.0.2** (published 2015-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-head-picker
pnpm add gulp-head-picker
yarn add gulp-head-picker
bun add gulp-head-picker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-12-24 |
| First published | 2014-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| Author | Hiroshi Takase |
| Maintainers | lost_and_found |
| Keywords | gulpplugin, html, metadata |

## Links

- npm: https://www.npmjs.com/package/gulp-head-picker
- npm.io page: https://npm.io/package/gulp-head-picker

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [head-picker](https://npm.io/package/head-picker.md) 0.0.2
- [event-stream](https://npm.io/package/event-stream.md) ^3.1.7

## 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

- 0.0.2 (latest) — 2015-12-24
- 0.0.1 — 2014-10-31

## README

# gulp-head-picker

gulp plugin to extract heading elements from HTML string.

## Install

With npm do:

```
npm install gulp-head-picker
```

## Usage

Input file:

```html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>title</title>
</head>
<body>
  <h1>Heading1</h1>
  <h2>Heading2</h2>
  <h3>Heading3</h3>
  <h4>Heading4</h4>
  <h5>Heading5</h5>
  <h6>Heading6</h6>
</body>
</html>
```

Script:

```javascript
var hp = require('gulp-head-picker');

gulp.src('./sample.html')
    .pipe(hp({
      property: 'toc', // property added to file object
    }))
    .pipe(…)
```

Result:

```
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>title</title>
</head>
<body>
  <h1 id="toc_index_0">Heading1</h1>
  <h2 id="toc_index_1">Heading2</h2>
  <h3 id="toc_index_2">Heading3</h3>
  <h4 id="toc_index_3">Heading4</h4>
  <h5 id="toc_index_4">Heading5</h5>
  <h6 id="toc_index_5">Heading6</h6>
</body>
</html>
```

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

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