# @288-toolkit/html-parser

> ```sh npm i @288-toolkit/html-parser ```

Latest version **1.0.4** (published 2025-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @288-toolkit/html-parser
pnpm add @288-toolkit/html-parser
yarn add @288-toolkit/html-parser
bun add @288-toolkit/html-parser
```

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2025-02-04 |
| First published | 2024-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | DeuxHuitHuit |
| Maintainers | nitriques, f-elix |

## Links

- npm: https://www.npmjs.com/package/@288-toolkit/html-parser
- npm.io page: https://npm.io/package/@288-toolkit/html-parser

## Dependencies (2)

- [@288-toolkit/types](https://npm.io/package/@288-toolkit/types.md) 3.1.0
- [@288-toolkit/strings](https://npm.io/package/@288-toolkit/strings.md) ^4.3.1

## Recent versions

- 1.0.4 (latest) — 2025-02-04
- 1.0.3 — 2025-02-03
- 1.0.2 — 2024-05-16
- 1.0.1 — 2024-05-01
- 1.0.0 — 2024-05-01

## README

# Html-parser

```sh
npm i @288-toolkit/html-parser
```

A collection of functions to work with html strings.

## `html()`

Provides a simple way to manipulate HTML strings. It returns itself after each method call, so you
can chain them. You end the chain by calling the `toString()` method.

```ts
const textWithOnlyBoldAndItalic = html(text)
	.newLinesToBr() // Converts line break characters to <br /> tags
	.removeEmptyTags() // Removes empty tags from the HTML string
	.stripTags(['strong', 'em']) // Removes all HTML tags from the string, except `strong` and `em`.
	.toString(); // Returns the processed HTML string
```

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