1- # lib-boilerplate
1+ # domiso
22
3- [ ![ GitHub Actions] ( https://github.com/un-ts/lib-boilerplate /workflows/CI/badge.svg )] ( https://github.com/un-ts/lib-boilerplate /actions/workflows/ci.yml )
4- [ ![ Codecov] ( https://img.shields.io/codecov/c/github/un-ts/lib-boilerplate .svg )] ( https://codecov.io/gh/un-ts/lib-boilerplate )
5- [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/un-ts/lib-boilerplate .svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/un-ts/lib-boilerplate /context:javascript )
6- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fux -ts%2Flib-boilerplate %2Fmain%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
7- [ ![ npm] ( https://img.shields.io/npm/v/lib-boilerplate .svg )] ( https://www.npmjs.com/package/lib-boilerplate )
8- [ ![ GitHub Release] ( https://img.shields.io/github/release/un-ts/lib-boilerplate )] ( https://github.com/un-ts/lib-boilerplate /releases )
3+ [ ![ GitHub Actions] ( https://github.com/un-ts/domiso /workflows/CI/badge.svg )] ( https://github.com/un-ts/domiso /actions/workflows/ci.yml )
4+ [ ![ Codecov] ( https://img.shields.io/codecov/c/github/un-ts/domiso .svg )] ( https://codecov.io/gh/un-ts/domiso )
5+ [ ![ Language grade: JavaScript] ( https://img.shields.io/lgtm/grade/javascript/g/un-ts/domiso .svg?logo=lgtm&logoWidth=18 )] ( https://lgtm.com/projects/g/un-ts/domiso /context:javascript )
6+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun -ts%2Fdomiso %2Fmain%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
7+ [ ![ npm] ( https://img.shields.io/npm/v/domiso .svg )] ( https://www.npmjs.com/package/domiso )
8+ [ ![ GitHub Release] ( https://img.shields.io/github/release/un-ts/domiso )] ( https://github.com/un-ts/domiso /releases )
99
1010[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
1111[ ![ Renovate enabled] ( https://img.shields.io/badge/renovate-enabled-brightgreen.svg )] ( https://renovatebot.com )
1212[ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg )] ( https://standardjs.com )
1313[ ![ Code Style: Prettier] ( https://img.shields.io/badge/code_style-prettier-ff69b4.svg )] ( https://github.com/prettier/prettier )
1414[ ![ changesets] ( https://img.shields.io/badge/maintained%20with-changesets-176de3.svg )] ( https://github.com/atlassian/changesets )
1515
16- A simple library boilerplate.
16+ Dom sanitizer based on browser native DOMParser
1717
1818## TOC <!-- omit in toc -->
1919
@@ -31,21 +31,22 @@ A simple library boilerplate.
3131
3232``` sh
3333# pnpm
34- pnpm add lib-boilerplate
34+ pnpm add domiso
3535
3636# yarn
37- yarn add lib-boilerplate
37+ yarn add domiso
3838
3939# npm
40- npm i lib-boilerplate
40+ npm i domiso
4141```
4242
4343### API
4444
4545``` js
46- import echo from ' lib-boilerplate '
46+ import { sanitize , sanitizeSvg } from ' domiso '
4747
48- echo ()
48+ sanitize (` <!-- HTML content -->` )
49+ sanitizeSvg (` <svg>SVG content</svg>` )
4950```
5051
5152## Sponsors
0 commit comments