domiso
v0.1.1
Published
The smallest and fastest Dom sanitizer based on browser native DOMParser
Downloads
20
Maintainers
Readme
domiso
The smallest and fastest DOM sanitizer based on browser native DOMParser
TOC
Usage
Install
# pnpm
pnpm add domiso
# yarn
yarn add domiso
# npm
npm i domiso
API
import { IMAGE_SVG_XML, sanitize, sanitizeSvg } from 'domiso'
sanitize(`<!-- HTML content -->`)
sanitize(`<svg>SVG content</svg>`, IMAGE_SVG_XML)
sanitizeSvg(`<svg>SVG content</svg>`)
Sponsors
| 1stG | RxTS | UnTS | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | | | |
Backers
| 1stG | RxTS | UnTS | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | | | |
Changelog
Detailed changes for each release are documented in CHANGELOG.md.