Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 4.58 KB

README.md

File metadata and controls

76 lines (53 loc) · 4.58 KB

domiso

GitHub Actions Codecov type-coverage npm GitHub Release

Conventional Commits Renovate enabled JavaScript Style Guide Code Style: Prettier changesets

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
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

Backers

Backers

1stG RxTS UnTS
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT © JounQin@1stG.me