0.1.1 โข Published 3 years ago
@sanitise/html v0.1.1
@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'