Skip to content

A ~200 bytes function with no dependencies for decoding HTML entities, it only works in the browser.

License

Notifications You must be signed in to change notification settings

fabiospampinato/entities-dom-decode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Entities DOM Decode

A ~200 bytes function with no dependencies for decoding HTML entities, it only works in the browser.

Features

  • Every other package for decoding HTML entities ships with a ~30kb list of entities supported, this package doesn't need such list as it uses the DOM for decoding entities, and it's as a result ~99% smaller. The downside is that it only works in the browser.

Install

npm install --save entities-dom-decode

Usage

import decode from 'entities-dom-decode';

// Let's decode some HTML entities

decode ( 'foo&:bar' ); // => 'foo&:bar'

License

MIT © Fabio Spampinato

About

A ~200 bytes function with no dependencies for decoding HTML entities, it only works in the browser.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published