@jill64/universal-sanitizer
TypeScript icon, indicating that this package has built-in type declarations

1.2.13Β β€’Β PublicΒ β€’Β Published

@jill64/universal-sanitizer

npm-version npm-license npm-download-month npm-min-size ci.yml

πŸ’Ž Isomorphic html sanitizer by DOMPurify + sanitize-html

Installation

npm i @jill64/universal-sanitizer

Usage

Conditional Export applies the appropriate file at each runtime.

import { sanitize } from '@jill64/universal-sanitizer'

const cleaned = sanitize(/* ... */, {
  // options: {
  //   sanitizeHtml: sanitize-html options
  //   dompurify: DOMPurify options
  // }
})
condition resolve
browser DOMPurify
default sanitize-html
worker sanitize-html

License

MIT

/@jill64/universal-sanitizer/

    Package Sidebar

    Install

    npm i @jill64/universal-sanitizer

    Weekly Downloads

    31,977

    Version

    1.2.13

    License

    MIT

    Unpacked Size

    211 kB

    Total Files

    13

    Last publish

    Collaborators

    • jill64