A ~200 bytes function with no dependencies for decoding HTML entities, it only works in the browser.
- 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.
npm install --save entities-dom-decode
import decode from 'entities-dom-decode';
// Let's decode some HTML entities
decode ( 'foo&:bar' ); // => 'foo&:bar'
MIT © Fabio Spampinato