## Usage ```js var decode = require('{%= name %}'); console.log(decode('<div>abc</div>')); //=> '
abc
' // get the default entities directly console.log(decode.chars); ``` ## Characters For performance, this library only handles the following common entities (split into groups for backward compatibility). ### Default entities Only the following entities are converted by default. | **Character** | **Description** | **Entity Name** | **Entity Number** | | --- | --- | --- | --- | | `<` | less than | `<` | `<` | | `>` | greater than | `>` | `>` | | `&` | ampersand | `&` | `&` | | `"` | double quotation mark | `"` | `"` | | `'` | single quotation mark (apostrophe) | `'` | `'` | Get the default entities as an object: ```js console.log(decode.chars); ``` ### Extra entities Only the following entities are converted when `'extras'` is passed as the second argument. | **Character** | **Description** | **Entity Name** | **Entity Number** | | `¢` | cent | `¢` | `¢` | | `£` | pound | `£` | `£` | | `¥` | yen | `¥` | `¥` | | `€` | euro | `€` | `€` | | `©` | copyright | `©` | `©` | | `®` | registered trademark | `®` | `®` | Example: ```js // convert only the "extras" characters decode(str, 'extras'); // get the object of `extras` characters console.log(decode.extras); ``` ### All entities Convert both the defaults and extras: ```js decode(str, 'all'); ``` Get all entities as an object: ```js console.log(decode.all); ``` ## Alternatives If you need a more robust implementation, try one of the following libraries: - [html-entities][] - [ent][]