The smallest and fastest DOM sanitizer based on browser native DOMParser
# pnpm
pnpm add domiso
# yarn
yarn add domiso
# npm
npm i domiso
import { IMAGE_SVG_XML, sanitize, sanitizeSvg } from 'domiso'
sanitize(`<!-- HTML content -->`)
sanitize(`<svg>SVG content</svg>`, IMAGE_SVG_XML)
sanitizeSvg(`<svg>SVG content</svg>`)
1stG | RxTS | UnTS |
---|---|---|
1stG | RxTS | UnTS |
---|---|---|
Detailed changes for each release are documented in CHANGELOG.md.