Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@favware/unescape

favware42MITdeprecated1.3.2TypeScript support: included

Work on this package has stopped in favor of confusables (https://www.npmjs.com/package/confusables) from developer gc (https://github.com/gc), a package which I have also contributed to and has a much better feature set and far better performance

Convert HTML entities to HTML characters, e.g. > converts to >.

char, character, characters, entities, entity, escape, html, string, un-escape, unescape, unescape-es6, xml, favware, typescript, ts

readme

DEPRECATED

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


logo

@favware/unescape

Convert HTML entities to HTML characters, e.g. > converts to >.


Project Status

GitHub Codecov

Bundle Sizes

npm bundle size npm bundle size npm

Social Media and Donations

Join Discord server Twitter Follow Patreon Donate PayPal Donate


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

Install with yarn or npm:

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);

API Documentation

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

1.3.2 (2020-01-22)

Note: Version bump only for package @favware/unescape

1.3.1 (2019-11-09)

Note: Version bump only for package @favware/unescape

1.3.0 (2019-10-20)

Features

  • unescape: added dollar and trademark entities (5f332a9)

1.2.0 (2019-10-20)

Features

  • add support for additional HTML entities (2a724b9)

1.1.2 (2019-10-13)

Bug Fixes

  • completely re-do tsconfig standardized (9eb030f)

1.1.1 (2019-10-13)

Note: Version bump only for package @favware/unescape

1.1.0 (2019-10-13)

Features

  • standardize TS configuration (47696f4)

1.0.5 (2019-09-11)

Note: Version bump only for package @favware/unescape

1.0.4 (2019-09-11)

Note: Version bump only for package @favware/unescape

1.0.3 (2019-08-21)

Note: Version bump only for package @favware/unescape

1.0.2 (2019-08-18)

Reverts

  • "ci: another attempt to fix CI config" (37c385f)