# tokenz-html

> Tokenizes HTML using `tokenz` package.

Latest version **0.1.0-5** (published 2020-06-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install tokenz-html
pnpm add tokenz-html
yarn add tokenz-html
bun add tokenz-html
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0-5 |
| Published | 2020-06-19 |
| First published | 2020-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gtarsia |

## Links

- npm: https://www.npmjs.com/package/tokenz-html
- npm.io page: https://npm.io/package/tokenz-html

## Dependencies (3)

- [esm](https://npm.io/package/esm.md) ^3.2.25
- [dummee](https://npm.io/package/dummee.md) ^1.2.0
- [tokenz](https://npm.io/package/tokenz.md) ^0.1.0-0

## Recent versions

- 0.1.0-5 (latest) — 2020-06-19
- 0.1.0-13 (next) — 2020-06-22
- 0.1.0-12 — 2020-06-22
- 0.1.0-11 — 2020-06-22
- 0.1.0-10 — 2020-06-19
- 0.1.0-9 — 2020-06-19
- 0.1.0-8 — 2020-06-19
- 0.1.0-7 — 2020-06-19
- 0.1.0-6 — 2020-06-19
- 0.1.0-4 — 2020-06-18
- 0.1.0-3 — 2020-06-18
- 0.1.0-2 — 2020-06-17
- 0.1.0-1 — 2020-06-17
- 0.1.0-0 — 2020-06-17

## README

# tokenz-html

Tokenizes HTML using `tokenz` package.

* Lightweight (flat dependency tree)
* Adheres to HTML standard
* Closes unclosed tokens if end of text is reached
* Doesn't include CDATA (create an issue if you want this)

## Install

Install package `html-tokenz` with npm/yarn/pnpm.

## Usage

```javascript
import { tokenize, tokenTypes } from 'tokenz-html'

tokenize(`<a qwe=asd><b><!-- hey there --></a`)
/* [
  { name: 'a', attrs: [{ name: 'qwe', value: 'asd' }, type: 'start_tag' ] },
  { name: 'b', type: 'start_tag' },
  { text: ' hey there ', type: 'comment' },
  { name: 'a', type: 'close_tag' },
]
*/
```

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