# amuchina

> A work-in-progress HTML sanitizer that strives for: performance like window.Sanitizer, readiness like DOMPurify, and ability to run in a WebWorker like neither of those.

Latest version **1.0.12** (published 2024-04-04) · 0 weekly downloads

## Install

```sh
npm install amuchina
pnpm add amuchina
yarn add amuchina
bun add amuchina
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.12 |
| Published | 2024-04-04 |
| First published | 2022-07-24 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 50.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Maintainers | fabiospampinato |
| Keywords | html, dom, sanitizer, fast |

## Links

- npm: https://www.npmjs.com/package/amuchina
- Repository: https://github.com/fabiospampinato/amuchina
- Homepage: https://github.com/fabiospampinato/amuchina#readme
- Issues: https://github.com/fabiospampinato/amuchina/issues
- npm.io page: https://npm.io/package/amuchina

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.12 (latest) — 2024-04-04
- 1.0.11 — 2023-02-11
- 1.0.10 — 2022-10-04
- 1.0.9 — 2022-10-04
- 1.0.8 — 2022-08-16
- 1.0.7 — 2022-07-25
- 1.0.6 — 2022-07-25
- 1.0.5 — 2022-07-24
- 1.0.4 — 2022-07-24
- 1.0.3 — 2022-07-24
- 1.0.2 — 2022-07-24
- 1.0.1 — 2022-07-24
- 1.0.0 — 2022-07-24

## README

# Amuchina

A work-in-progress HTML sanitizer that strives for: performance like `window.Sanitizer`, readiness like `DOMPurify`, and ability to run in a `WebWorker` like neither of those.

This is basically an implementation of a _subset_ of the upcoming [Sanitizer API](https://wicg.github.io/sanitizer-api/), but it also supports SVG and MathML out of the box.

## Install

```sh
npm install --save amuchina
```

## Usage

```ts
import Amuchina from 'amuchina';

const amuchina = new Amuchina ();
const parser = new DOMParser ();

const parse = ( html: string ) => parser.parseFromString ( html, 'text/html' );

amuchina.sanitize ( parse ( `<img src="/err" onerror="javascript:alert('naughty!')" />` ) );
```

## License

MIT © Fabio Spampinato

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