{"name":"htmlescape","version":"1.1.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":"06156f88adccb5a2a5b9c7dd14628a931f96541d","bugs":{"url":"https://github.com/zertosh/htmlescape/issues"},"_id":"htmlescape@1.1.0","_shasum":"ebf7a9524f7c86b5f6888589b40bdba712eafa67","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"zertosh","email":"zertosh@gmail.com"},"maintainers":[{"name":"zertosh","email":"zertosh@gmail.com"}],"dist":{"shasum":"ebf7a9524f7c86b5f6888589b40bdba712eafa67","tarball":"http://registry-npm.ywwl.com/htmlescape/download/htmlescape-1.1.0.tgz","integrity":"sha512-ZOXdaYwR5B/k0633emjfrDYqQcEFXsVLrlrag4Rwgs8MM8MK5u67LPQ3VbDYkJAahSZ65+cDnAXSSDkpac0M5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOOSyngSabB6DS7XdnFxwvWiA8mhOU9nr3bpZyj5Hc2QIgHaZv4kHDMzGhyOFQx0yN6jrFaWtzHY40B12Ld/Zm54g="}],"size":1189,"noattachment":false,"key":"/htmlescape/-/htmlescape-1.1.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":1428875584584,"_cnpm_publish_time":1428875584584,"dist-tags":{"latest":"1.1.1"}}