tiny-decode
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

tiny-decode

Decoding HTML named character references traditionally requires a large table to store entity names and the code points to which they refer. Unless you take extreme care, this data can easily end up in your JavaScript bundle.

tiny-decode takes advantage of export conditions to include only as much JavaScript as necessary. For bundled browser code, the decode function is only a few bytes. For server-side code, decode includes the full entities module, which is much larger.

Example

Bundle `entities`     18.52 kB │ gzip: 19.64 kB
Bundle `tiny-decode`   0.97 kB │ gzip: 0.56 kB

Readme

Keywords

Package Sidebar

Install

npm i tiny-decode

Weekly Downloads

221

Version

0.1.3

License

MIT

Unpacked Size

3.51 kB

Total Files

7

Last publish

Collaborators

  • natemoo-re