0.1.1 โ€ข Published 3 years ago

@sanitise/html v0.1.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
3 years ago

size openbase libera manifesto

@sanitise/html

๐Ÿงผ Sanitise HTML and XML from an input

Requirements

This module requires an Active LTS Node version (v14.15.0+).

Install

Using npm:

npm install @sanitise/html

Usage

const { sanitise } = require('@sanitise/html');
sanitise('<div>batman</div>');
// โ†’ 'batman'

Falsey Results

This package follows the behavior of JSON.stringify. The following results for falsey values can be expected:

sanitise(undefined);
// โ†’ undefined

sanitise(null);
// โ†’ 'null'

sanitise('');
// โ†’ ''

sanitise(false);
// โ†’ 'false'

Meta

CONTRIBUTING

LICENSE (MIT)