{"name":"htmlescape","version":"1.0.0","description":"Properly escape JSON for usage as an object literal inside of a `<script>` tag","keywords":["escape","encoding","html","json","template"],"homepage":"https://github.com/zertosh/htmlescape","licence":"MIT","author":{"name":"Andres Suarez","email":"zertosh@gmail.com"},"main":"htmlescape.js","repository":{"type":"git","url":"git://github.com/zertosh/htmlescape.git"},"scripts":{"test":"tape test/*.js"},"dependencies":{},"devDependencies":{"tape":"^3.0.0"},"engines":{"node":">=0.10"},"gitHead":"c60271799d85183151bed4ca8fbe99cf0cc2e546","bugs":{"url":"https://github.com/zertosh/htmlescape/issues"},"_id":"htmlescape@1.0.0","_shasum":"bdc7670dbb7e011353474232bc5a0bbb42bb661e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"zertosh","email":"zertosh@gmail.com"},"maintainers":[{"name":"zertosh","email":"zertosh@gmail.com"}],"dist":{"shasum":"bdc7670dbb7e011353474232bc5a0bbb42bb661e","tarball":"http://registry-npm.ywwl.com/htmlescape/download/htmlescape-1.0.0.tgz","integrity":"sha512-o8kc+5gxA9ju/8OMx6C7FHUCCqwyMcckkGikVkR6ysjHeRFNspN+SkY5qaX6vfZtFVGiEIP9/7WcB9aemZRIJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuAmxUxButii1VIPVhiKikebUWTJC2uuC7k/U2hVkI5QIhAIweA22Q0F2Wwdj1tpUD2eb0jwTyBID1E/hsweDozpw6"}],"size":1116,"noattachment":false,"key":"/htmlescape/-/htmlescape-1.0.0.tgz"},"directories":{},"readme":"# htmlescape\n\nProperly escape JSON for usage as an object literal inside of a `<script>` tag. Use `htmlescape` in place of `JSON.stringify`. For more info see [JSON: The JavaScript subset that isn't](http://timelessrepo.com/json-isnt-a-javascript-subset).\n\n## Transformations\n\n| from     | to        |\n| -------- |:---------:|\n| `&`      | `\\\\u0026` |\n| `>`      | `\\\\u003e` |\n| `<`      | `\\\\u003c` |\n| `\\u2028` | `\\\\u2028` |\n| `\\u2029` | `\\\\u2029` |\n\n\n## Usage\n\n```js\nvar htmlescape = require('htmlescape');\nhtmlescape({prop:'value'});\n//=> '{\"prop\":\"value\"}'\n```\n\nOr in your templates:\n\n```html\n<script>\nvar payload = <%= htmlescape(payload) %>;\n</script>\n```\n","publish_time":1411944069849,"_cnpm_publish_time":1411944069849,"dist-tags":{"latest":"1.1.1"}}