Skip to content
/ domiso Public
generated from un-ts/lib-boilerplate

The smallest and fastest DOM sanitizer based on browser native DOMParser

License

Notifications You must be signed in to change notification settings

un-ts/domiso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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