{"name":"json-hammerhead","version":"0.1.3","description":"This is a JSON implementation used in [TestCafe Hammerhead](https://github.com/DevExpress/testcafe-hammerhead) web proxy's client code.","main":"json.js","scripts":{"test":"mocha test.js","publish-please":"publish-please","prepublishOnly":"publish-please guard"},"repository":{"type":"git","url":"git+https://github.com/miherlosev/json-hammerhead.git"},"keywords":["json"],"author":{"name":"miherlosev","email":"miherlosev@mail.ru","url":"http://devexpress.com/"},"license":"MIT","bugs":{"url":"https://github.com/miherlosev/json-hammerhead/issues"},"homepage":"https://github.com/miherlosev/json-hammerhead#readme","devDependencies":{"mocha":"^5.2.0","publish-please":"^5.4.3"},"gitHead":"e571efcf648ce23c597198af2656496b0ac0d6eb","_id":"json-hammerhead@0.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"lavrovartem","email":"artjomlav@gmail.com"},"dist":{"integrity":"sha512-qaUpqxn4W8kTnJQqlP89dnR75KJd5NIUvjhadiqshvoBPGI75AK7M9htZ3SsbLnSeYdLCJuHemyDJ+MR3AkVdg==","shasum":"64c3139a704655d686b7504feedaff8c37cb7efb","tarball":"http://registry-npm.ywwl.com/json-hammerhead/download/json-hammerhead-0.1.3.tgz","fileCount":6,"unpackedSize":14047,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm0hoCRA9TVsSAnZWagAAg+cP/3iRvB4r9Gqx1XW+wnj/\np1cCwWHUwrBWevbbQey6FYqu/TC+mwMsHhOWJx9kpUhA2sjMMqoTBWpZNWj7\nmGs/Iw7yxh80TRSX14sDtMwlkDsA2+tANPqOMnBVJmUPD9JqgFyp87YO4Zby\n/ITdVt2GNabDvyoSbCtwo+SHdo36uWAZdq7w1FzHJIZZCxhQdFTlc5ZAWrpa\nP0EVsBoh95Jyw1tXeHaFzigqhclSKjiFpStkWEsytzckcGsZKsyhBf7Bo9H3\njURNxbnXUOZxzjkCd31qV8RoYfNixt/PremA/zeQqE3IujHvUypNHwwtiXBk\nPbZ0GPkW5+Gz3sO1zsi9aCk5iQ/J8pP4IofYjlrJEsGQnfxTTvJQZjILAaPa\nyTusSzCS6IgSgwSyKOLKzD2ccPwsORWuO5I8OVQXzYo6jqle5qcxvCAcOlVk\niT7/v3vkF/Z2hBv3Y2HDjIjwmCAp8DltoW90FYlwPL8FM74Dj6rrKkGh+VAJ\nzDUafamk6doIjZGuIAHZjbUYVE/Wwh55CFbtkTccvuBUAXp+l9NLIlKxqQur\nRKrkkVfEtGvyEWhijbLQZBQlE7rWbVnbw1p13dfb5T2IYgfVEvkN5uj3Fotl\niFy/Wpu+t/vz7aaVjRJfm5eGzI9mDLUR1By0s6nblgjyusnox9iNyK1AgjJu\nTH5g\r\n=wRbj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2GnVT33oX4faxpvtQvPgBlx6VpkUkc5YZoI4enYOcVwIgZISvIB+Sbitwroatft84pdqDAkl1DBwQQPX3/DxYVRg="}],"size":5320,"noattachment":false,"key":"/json-hammerhead/-/json-hammerhead-0.1.3.tgz"},"maintainers":[{"name":"miherlosev","email":"mlosev86@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-hammerhead_0.1.3_1553680487928_0.7554178456410057"},"_hasShrinkwrap":false,"deprecated":"The json-hammerhead package has reached end-of-life and will not receive further updates.","readme":"# Hammerhead-Tailored JSON Implementation\r\n \r\nThis is a JSON implementation used in [TestCafe Hammerhead](https://github.com/DevExpress/testcafe-hammerhead) web proxy's client code.\r\n \r\nSerialization/deserialization logic is borrowed from http://json.org/json2.js.\r\n \r\n## Motivation\r\n \r\nTestCafe Hammerhead client code required an isolated JSON implementation that does not rely on any external stuff (like prototypes, existing JSON implementations, etc.)\r\n \r\nSo we ended up with this `json-hammerhead` module based on `json2.js` but without fallbacks to the existing JSON implementations.\r\n \r\n## Usage\r\n \r\nProvides drop-in replacement for standard `JSON.parse` and `JSON.stringify` methods.\r\n \r\n```js\r\nconst JSON = require('json-hammerhead');\r\n \r\nlet jsonString = '{\"foo\": \"bar\"}';\r\nconst obj      = JSON.parse(jsonString);\r\n \r\nconsole.log(obj.foo) // > bar ;\r\n \r\nobj.foo = \"abc\";\r\njsonString = JSON.stringify(obj);\r\n \r\nconsole.log(jsonString) // > {\"foo\": \"abc\"} ;\r\n```\r\n \r\nAdds the `JSON.isSerializable` method that determines if the given object can be serialized.\r\n \r\n```js\r\nconst JSON = require('json-hammerhead');\r\n \r\nif(JSON.isSerializable({ foo: \"bar\" }))\r\n    console.log('Regular JavaScript objects can be serialized');\r\n \r\nif(!JSON.isSerializable(document.body))\r\n    console.log('DOM nodes cannot be serialized');    \r\n    \r\nif(!JSON.isSerializable(function () { return void 0; }))\r\n    console.log('Functions cannot be serialized');\r\n```\r\n\r\n","publish_time":1553680488088,"_cnpm_publish_time":1553680488088,"dist-tags":{"latest":"0.1.3"}}