1.3.2 • Published 5 years ago
@favware/unescape v1.3.2
Work on this package has stopped in favor of confusables from developer gc, a package which I have also contributed to and has a much better feature set and far better performance
Project Status
Bundle Sizes
Social Media and Donations
Easily unescape HTML entities in both the backend and the frontend
Key Features
- Useable in NodeJS through package manager of choice
- Typesafe
- Bundled with Rollup for maximum size reduction (only 1kB minified + gzipped!), ES module support and browser support
- Generated TypeScript declarations
- Treeshakeable in Webpack
Install
yarn add @favware/unescape
# npm install @favware/unescape
Usage
const { unescape, charSets } = require('@favware/unescape');
// import unescape, { charSets } from '@favware/unescape';
const text = '<div>unescaped</div>';
console.log(unescape('<div>abc</div>'));
console.log(unescape`<div>abc</div>`);
console.log(unescape`awesome text with some ${text} section`);
// Log the supported characters
console.log(charSets);