{"_id":"unescape","_rev":"1076","name":"unescape","description":"Convert HTML entities to HTML characters, e.g. `&gt;` converts to `>`.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T09:55:56.000Z","created":"2014-09-14T07:32:08.240Z","1.0.1":"2017-06-08T19:33:07.614Z","1.0.0":"2017-06-04T17:14:17.960Z","0.2.0":"2016-11-28T06:25:18.735Z","0.1.1":"2014-09-14T07:32:22.729Z","0.1.0":"2014-09-14T07:32:08.240Z"},"users":{"bluecor0":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/unescape.git"},"versions":{"1.0.1":{"name":"unescape","description":"Convert HTML entities to HTML characters, e.g. `&gt;` converts to `>`.","version":"1.0.1","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":["html-elements","html-tag","html-toc","is-self-closing"]},"reflinks":["ent","html-entities"]},"dependencies":{"extend-shallow":"^2.0.1"},"gitHead":"729b8db41a70afde32e158d576654909ca3d9a0e","_id":"unescape@1.0.1","_npmVersion":"5.0.3","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"956e430f61cad8a4d57d82c518f5e6cc5d0dda96","size":3627,"noattachment":false,"key":"/unescape/-/unescape-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/unescape/download/unescape-1.0.1.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unescape-1.0.1.tgz_1496950386675_0.1343847329262644"},"directories":{},"publish_time":1496950387614,"_hasShrinkwrap":false,"_cnpm_publish_time":1496950387614},"1.0.0":{"name":"unescape","description":"Convert HTML entities to HTML characters, e.g. `&gt;` converts to `>`.","version":"1.0.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":["html-elements","html-tag","html-toc","is-self-closing"]},"reflinks":["ent","html-entities"]},"gitHead":"f418917e33056fbf6e58f4fd9d787c3fcd981cd0","_id":"unescape@1.0.0","_npmVersion":"5.0.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"9413f6ac8aeec466718a1e61293c885cbd3359ea","size":3609,"noattachment":false,"key":"/unescape/-/unescape-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unescape/download/unescape-1.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unescape-1.0.0.tgz_1496596457051_0.08052323432639241"},"directories":{},"publish_time":1496596457960,"_cnpm_publish_time":1496596457960,"_hasShrinkwrap":false},"0.2.0":{"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","size":2338,"noattachment":false,"key":"/unescape/-/unescape-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unescape/download/unescape-0.2.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/unescape-0.2.0.tgz_1480314316409_0.9066088222898543"},"directories":{},"publish_time":1480314318735,"_cnpm_publish_time":1480314318735,"_hasShrinkwrap":false},"0.1.1":{"name":"unescape","description":"Convert the HTML entities in a string to their corresponding HTML characters, e.g. `&gt;` converts to `>`.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/unescape","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/unescape.git"},"bugs":{"url":"https://github.com/jonschlinkert/unescape/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/unescape/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb-tag-jscomments":">= 0.2.0","verb":">= 0.2.6","mocha":"*"},"keywords":["string","entity","entities","char","characters","character","html","xml","escape","unescape","un-escape"],"_id":"unescape@0.1.1","_shasum":"098b4bbf743252ba9e28f2b6d383e9c805359caa","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"098b4bbf743252ba9e28f2b6d383e9c805359caa","size":2936,"noattachment":false,"key":"/unescape/-/unescape-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/unescape/download/unescape-0.1.1.tgz"},"directories":{},"publish_time":1410679942729,"_cnpm_publish_time":1410679942729,"_hasShrinkwrap":false},"0.1.0":{"name":"unescape","description":"Convert the HTML entities in a string to their corresponding HTML characters, e.g. `&gt;` converts to `>`.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/unescape","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/unescape.git"},"bugs":{"url":"https://github.com/jonschlinkert/unescape/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/unescape/blob/master/LICENSE-MIT"}],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"verb-tag-jscomments":">= 0.2.0","verb":">= 0.2.6","mocha":"*"},"keywords":["string","entity","entities","char","characters","character","html","xml","escape","unescape","un-escape"],"_id":"unescape@0.1.0","_shasum":"188ded8f1b97da333b23e383f4c71d5ad0ddf337","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"188ded8f1b97da333b23e383f4c71d5ad0ddf337","size":2693,"noattachment":false,"key":"/unescape/-/unescape-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/unescape/download/unescape-0.1.0.tgz"},"directories":{},"publish_time":1410679928240,"_cnpm_publish_time":1410679928240,"_hasShrinkwrap":false}},"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._","_attachments":{},"homepage":"https://github.com/jonschlinkert/unescape","bugs":{"url":"https://github.com/jonschlinkert/unescape/issues"},"license":"MIT"}