{"name":"unescape","description":"Convert HTML entities to HTML characters, e.g. `&gt;` converts to `>`.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/unescape","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/unescape.git"},"bugs":{"url":"https://github.com/jonschlinkert/unescape/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^0.1.11","mocha":"^3.2.0"},"keywords":["char","character","characters","entities","entity","escape","html","string","un-escape","unescape","xml"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":[]},"reflinks":["verb","verb-generate-readme"]},"gitHead":"d946a16159b46944ef268c979fbd221a44ee830f","_id":"unescape@0.2.0","_shasum":"b78b9b60c86f1629df181bf53eee3bc8d6367ddf","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b78b9b60c86f1629df181bf53eee3bc8d6367ddf","tarball":"http://registry-npm.ywwl.com/unescape/download/unescape-0.2.0.tgz","integrity":"sha512-bA3DIJFQYsxFkmw3EvWQy+Z4+UVtj8wppEHkEVw+tn3hJV79DrO2wc88Uz0XsLkh/e5sA9cLB2FlAU3p6Lx+8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjo62LNRNhb66pXtkRWp0I3yRuLouVrCxX+P5OEdYKuwIhAPhvnm3pWhL/ltMiRL5/ozFgpyAAPCdmTiUC2VBJbHnE"}],"size":2338,"noattachment":false,"key":"/unescape/-/unescape-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/unescape-0.2.0.tgz_1480314316409_0.9066088222898543"},"directories":{},"readme":"# unescape [![NPM version](https://img.shields.io/npm/v/unescape.svg?style=flat)](https://www.npmjs.com/package/unescape) [![NPM monthly downloads](https://img.shields.io/npm/dm/unescape.svg?style=flat)](https://npmjs.org/package/unescape) [![NPM total downloads](https://img.shields.io/npm/dt/unescape.svg?style=flat)](https://npmjs.org/package/unescape) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unescape.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/unescape)\n\n> Convert HTML entities to HTML characters, e.g. `&gt;` converts to `>`.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save unescape\n```\n\n## Usage\n\n```js\nvar decode = require('unescape');\n\nconsole.log(decode('&lt;div&gt;abc&lt;/div&gt;'));\n//=> '<div>abc</div>'\n\n// get the default entities directly\nconsole.log(decode.chars);\n```\n\n## Characters\n\nFor performance, this library only handles the following common entities (split into groups for backward compatibility).\n\n### Default entities\n\nOnly the following entities are converted by default.\n\n| **Character** | **Description** | **Entity Name** | **Entity Number** | \n| --- | --- | --- | --- |\n| `<` | less than | `&lt;` | `&#60;` |\n| `>` | greater than | `&gt;` | `&#62;` |\n| `&` | ampersand | `&amp;` | `&#38;` |\n| `\"` | double quotation mark | `&quot;` | `&#34;` |\n| `'` | single quotation mark (apostrophe) | `&apos;` | `&#39;` |\n\nGet the default entities as an object:\n\n```js\nconsole.log(decode.chars);\n```\n\n### Extra entities\n\nOnly the following entities are converted when `'extras'` is passed as the second argument.\n\n| **Character** | **Description** | **Entity Name** | **Entity Number** |\n| `¢` | cent                               | `&cent;`  | `&#162;` |\n| `£` | pound                              | `&pound;` | `&#163;` |\n| `¥` | yen                                | `&yen;`   | `&#165;` |\n| `€` | euro                               | `&euro;`  | `&#8364;` |\n| `©` | copyright                          | `&copy;`  | `&#169;` |\n| `®` | registered trademark               | `&reg;`   | `&#174;` |\n\nExample:\n\n```js\n// convert only the \"extras\" characters\ndecode(str, 'extras');\n// get the object of `extras` characters\nconsole.log(decode.extras);\n```\n\n### All entities\n\nConvert both the defaults and extras:\n\n```js\ndecode(str, 'all');\n```\n\nGet all entities as an object:\n\n```js\nconsole.log(decode.all);\n```\n\n## Alternatives\n\nIf you need a more robust implementation, try one of the following libraries:\n\n* [html-entities](https://github.com/mdevils/node-html-entities)\n* [ent](https://github.com/substack/node-ent)\n\n## About\n\n### Related projects\n\n* [html-elements](https://www.npmjs.com/package/html-elements): Array of all standard HTML and HTML5 elements. | [homepage](https://github.com/jonschlinkert/html-elements \"Array of all standard HTML and HTML5 elements.\")\n* [html-tag](https://www.npmjs.com/package/html-tag): Generate HTML elements from a javascript object. | [homepage](https://github.com/jonschlinkert/html-tag \"Generate HTML elements from a javascript object.\")\n* [html-toc](https://www.npmjs.com/package/html-toc): Generate a HTML table of contents using cheerio. | [homepage](https://github.com/jonschlinkert/html-toc \"Generate a HTML table of contents using cheerio.\")\n* [is-self-closing](https://www.npmjs.com/package/is-self-closing): Returns true if the given name is a HTML void element or common SVG self-closing… [more](https://github.com/jonschlinkert/is-self-closing) | [homepage](https://github.com/jonschlinkert/is-self-closing \"Returns true if the given name is a HTML void element or common SVG self-closing element.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 04, 2017._","publish_time":1480314318735,"_cnpm_publish_time":1480314318735,"dist-tags":{"latest":"1.0.1"}}