{"_id":"json8","_rev":"22-44550aa9812de3ae887a47a7885d335f","name":"json8","description":"JSON toolkit for JavaScript","dist-tags":{"latest":"1.0.5"},"versions":{"0.1.0":{"name":"json8","version":"0.1.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"main":"index.js","scripts":{"preversion":"npm run browserify && npm test","browserify":"webpack -p index.js JSON8.js --output-library=JSON8","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","gitHead":"1e8dd6b5fcaf9c02c1ab0218843bfc8c2a6ab251","bugs":{"url":"https://github.com/json8/JSON8/issues"},"_id":"json8@0.1.0","_shasum":"058213b7ef97337f328018c223107597b84c10cd","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.5","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"dist":{"shasum":"058213b7ef97337f328018c223107597b84c10cd","tarball":"https://registry.npmjs.org/json8/-/json8-0.1.0.tgz","integrity":"sha512-AfxyP3sfZfz2IQ+SCqHZdxkCEvTsndK4yNQZ8W6D0nG90g4OhjQMhJsnBXrdKrgGHPu41m+6CPqxhX6LBn03Vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQxiU2avVdyj5c0xexJCIGmgdoRT/+QO/RMOicIOCQNAiEAqJbH2OYgB50pOgvM7v6yEEMgnm587d+K+9Tyl9BowLw="}]},"directories":{}},"0.2.0":{"name":"json8","version":"0.2.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","gitHead":"6a608c49f1aa6dedc8c584b0bc6a150c47f0d57c","bugs":{"url":"https://github.com/json8/JSON8/issues"},"_id":"json8@0.2.0","_shasum":"be91e097ea416c9c763766f0817c5b2382dce0ca","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"dist":{"shasum":"be91e097ea416c9c763766f0817c5b2382dce0ca","tarball":"https://registry.npmjs.org/json8/-/json8-0.2.0.tgz","integrity":"sha512-Zea/7atqqO2T+VDQLcxgo7vdLEnr50o2WXVGCa1s1RWSdD3HAETPSVUlCQqvs6TGikxKE9Tmc9mlKZSK4f7syg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCgFA9eb0Jyrlls3kITym5AFnmwZtLRvwkz18slSnaAAIhAIJKl3SLi53xBNq0ZxMrGGlnPQl9v+R/d/P6Y/CLWK+u"}]},"directories":{}},"0.3.0":{"name":"json8","version":"0.3.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","devDependencies":{"eslint":"^0.24.1"},"gitHead":"82bc54af71d4eef0eaa3e840fa82a88fb352e388","_id":"json8@0.3.0","_shasum":"edbbeb219734cbc82b02cf0219e7d2ef107671b7","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"edbbeb219734cbc82b02cf0219e7d2ef107671b7","tarball":"https://registry.npmjs.org/json8/-/json8-0.3.0.tgz","integrity":"sha512-4tFBE+sXPV+wTAkAVk416txue9deq9/Kq6lreQrItQZOOjy8ZFMgSt3No7YYj4YxERUceUTl0rU09mPLp0/yaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC280ZPtdr0v1vJbx4rKa9G2kOJesWLQitMFt2j+WZA2gIhANidkdDlYjuqMNWP+jkFNETb+LxcgbU1KJHQH3Wd4/eW"}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{}},"0.4.0":{"name":"json8","version":"0.4.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","devDependencies":{"eslint":"^0.24.1"},"gitHead":"55154d9eb20ebc6cc7883b7d050688466d0810bd","_id":"json8@0.4.0","_shasum":"1c87089e596a31f06bc1eda157a6b36dd7d3d0f7","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"1c87089e596a31f06bc1eda157a6b36dd7d3d0f7","tarball":"https://registry.npmjs.org/json8/-/json8-0.4.0.tgz","integrity":"sha512-qajpc8YHfTjxu0avwGnMklSI3lb89qMMhYJBNPeEPOvg9oam4hzFJPcsT/sj0PJvwy7brdLGNBIlnrCmuj5fcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD95IRkeBXPVKwvZTS/2ocsnxsQusXWyCMdaZDUX5ZtLAIhAKFPNyU7HlD97b/laoRhEAwzrqt4bqJUArw+VFPx33sV"}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{}},"0.5.0":{"name":"json8","version":"0.5.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","devDependencies":{"eslint":"^0.24.1"},"gitHead":"8ba7544bf7b18d4bb873a1b0b5149b4c4dea27ce","_id":"json8@0.5.0","_shasum":"e236adecf81bf3336a28d987df0390eddf45020b","_from":".","_npmVersion":"2.13.5","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"e236adecf81bf3336a28d987df0390eddf45020b","tarball":"https://registry.npmjs.org/json8/-/json8-0.5.0.tgz","integrity":"sha512-kGadEvknT0Eqj6hE7jXxDdMhaoVkzaHzbd+BQ+up82GngUA4DZOU5b1nf0M++6lvIs3pxyZpx/19ro3SV1JRfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICTNUK5OOPM2hGOt6tfzU1fEnP5JTH9MGhhCEM+l1MUYAiAq7nR7TQ0v8u9vvuhmIIzpmeGzLJt2kYERNvYcHiXzXw=="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{}},"0.6.0":{"name":"json8","version":"0.6.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","devDependencies":{"eslint":"^0.24.1"},"gitHead":"a495df48c8dee804f11386da0a243cd1e7b3f5cf","_id":"json8@0.6.0","_shasum":"a5790bce83fcb670d0cd4bd6463f4eb9e7c835b2","_from":".","_npmVersion":"2.13.5","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"a5790bce83fcb670d0cd4bd6463f4eb9e7c835b2","tarball":"https://registry.npmjs.org/json8/-/json8-0.6.0.tgz","integrity":"sha512-0THYeBUfmcGgcSqV8oiu0V73WTTmyBnqFjltb2OpyRye94JCWXuhVFfX+q583PyHpnSPxjOlMDOJaL+3cAip/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBOFZG73e+UQ3ARZ/kYOmYT7ake4nG+F+CXyWnymPjXWAiEA+jamD9NjMQ3jYD5ievnHVOea68ui48ube/ykOxDwbz4="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{}},"0.7.0":{"name":"json8","version":"0.7.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"MIT","devDependencies":{"eslint":"^0.24.1"},"gitHead":"ff2f35cddf4521a459b00c5e296a51a86f57b7ff","_id":"json8@0.7.0","_shasum":"28d77a375e706974ebca435b751ca162cdc04a05","_from":".","_npmVersion":"2.13.5","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"28d77a375e706974ebca435b751ca162cdc04a05","tarball":"https://registry.npmjs.org/json8/-/json8-0.7.0.tgz","integrity":"sha512-tWI/z2IDw8vRG5+dMNwhLRaFp1kGU7Z0e2CfWV6vBC357pKmW4gYpK/+6j/7dT7y9k/VXDISBYpvGz4Pnljg2w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCF1HOTW5bPCuIO+AfR8Q/M6Qha0DnlJHL8Qz+SLgTODQIhAL0+GUxic+Cp3iJIPQ1U80exLcZ/uoLqzUgVflogaetI"}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{}},"0.8.0":{"name":"json8","version":"0.8.0","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm run webify && npm test","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"eslint":"^0.24.1"},"gitHead":"f9a8052d69f7bd2bae45f46eda3b041a248261fb","_id":"json8@0.8.0","_shasum":"b1b23cd1cd72d9b6e0c68bee27d02080dd5cd134","_from":".","_npmVersion":"2.14.3","_nodeVersion":"0.12.7","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"dist":{"shasum":"b1b23cd1cd72d9b6e0c68bee27d02080dd5cd134","tarball":"https://registry.npmjs.org/json8/-/json8-0.8.0.tgz","integrity":"sha512-QRhR9mJb0aL5viTdrf6QPOkMO4Yj+zVsuxXbtoJ1KC7YyeqUau1jhLHT5hEN3YzLdwSVspE5zX1EkS51N/27Ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH1PNJi4HMlv9DUs4QtEo6QCk/bJlEnRAcZGD35Vca+xAiBZ9nSyRA9zfOtFqWQTOfyIPhnJQgHY/HFajdlXsEhRXw=="}]},"directories":{}},"0.8.1":{"name":"json8","version":"0.8.1","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm test","prepublish":"npm run webify","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"babel":"^5.8.29","eslint":"^1.9.0","eslint-config-atlas":"^1.0.2","eslint-config-bestpratices":"^1.0.7"},"gitHead":"a709a1a573597b4d2f058676c54c09d6b2c2d7b2","_id":"json8@0.8.1","_shasum":"7dceacd98803a0a26b30bace6d80cb71c4a0a470","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"dist":{"shasum":"7dceacd98803a0a26b30bace6d80cb71c4a0a470","tarball":"https://registry.npmjs.org/json8/-/json8-0.8.1.tgz","integrity":"sha512-/gxEaZ2Udi6/TZq1cRwvGx0lWPgb4bUw0cyPNsUf4wR4TNnrVh/i4RKn6ncpTE7NBQzFkFDcvlGFg+7o+aI/Og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBQKh6TY70wWAgB1iJMS2XXUfdte9vt3OQSopRQe6D6iAiArbeNWFNlr2MYf/97vr4O7CFPPgfuNtLuMQ18rl4IVYA=="}]},"directories":{}},"0.8.2":{"name":"json8","version":"0.8.2","description":"JSON toolkit for JavaScript","keywords":["JSON"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm test","prepublish":"npm run webify","webify":"browserify -s JSON8 index.js -o JSON8.js","lint":"eslint .","unit":"mocha --compilers js:babel/register --recursive test/","test":"npm run unit && npm run lint && npm run webify"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"babel":"^5.8.29","eslint":"^1.9.0","eslint-config-atlas":"^1.0.2","eslint-config-bestpratices":"^1.0.7"},"gitHead":"1448a79259bf650a48e3a92a8854571a1688634a","_id":"json8@0.8.2","_shasum":"cfd304b833d887a0b563701d7f828625217b83a8","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"dist":{"shasum":"cfd304b833d887a0b563701d7f828625217b83a8","tarball":"https://registry.npmjs.org/json8/-/json8-0.8.2.tgz","integrity":"sha512-OccNfzRUau/Noa++GVGrH6zTs7L9tvSODc5exvRF/Zd+q8y3znpOp9fNsuKOR2KdCgS4Pzuvr+moGkxpoUX7sw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5GshHFjisOLXrOjlbipXq6yb1nimR61CaqOvssFYScgIgdNJd3rY1z5FV4RetatxUNSynpPX6JY37+vGUJAA0Zjg="}]},"directories":{}},"0.9.0":{"name":"json8","version":"0.9.0","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm test","prepublish":"npm run bundle","bundle":"browserify -s JSON8 index.js -o bundle.js","lint":"eslint .","unit":"mocha -r es6-collections --compilers js:babel-register --recursive test/","test":"npm run unit && npm run lint && npm run bundle"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"babel-preset-es2015":"^6.6.0","babel-register":"^6.5.1","es6-collections":"^0.5.6","eslint":"^1.10.3","eslint-config-atlas":"^1.0.2","eslint-config-bestpratices":"^1.0.7"},"gitHead":"f244866f77858bc5a61fffeb6e06fcd29b5f8104","_id":"json8@0.9.0","_shasum":"e5af5abce625c50bdcb96656895c1ae06386d5d8","_from":".","_npmVersion":"3.8.8","_nodeVersion":"6.0.0","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"e5af5abce625c50bdcb96656895c1ae06386d5d8","tarball":"https://registry.npmjs.org/json8/-/json8-0.9.0.tgz","integrity":"sha512-SrU+v3m2oUH3vDQIybDxKsjcNXAfVRGgp0H1P7xxXvjvDIrz0gjARSXQh6DjFsp9ObGk4Yj+8bJUNONfA9iMSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZcpxnz0hAaRB9LjASZ7o3/E01Xt6Y8tV2nmhdQ59hZAIhAPvzAx2qrVhSVKIzeQ4ysJsISV4o2xcldNs4JJ1pFE4h"}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/json8-0.9.0.tgz_1462200250628_0.7072442083153874"},"directories":{}},"0.9.1":{"name":"json8","version":"0.9.1","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm test","prepublish":"npm run bundle","bundle":"browserify -s JSON8 index.js -o bundle.js","lint":"eslint .","unit":"mocha -r es6-collections --compilers js:babel-register --recursive test/","test":"npm run unit && npm run lint && npm run bundle"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"babel-preset-es2015":"^6.6.0","babel-register":"^6.5.1","es6-collections":"^0.5.6","eslint":"^1.10.3","eslint-config-atlas":"^1.0.2","eslint-config-bestpratices":"^1.0.7"},"gitHead":"f679d54ded82ca9a361b9e3f450418db9f74416b","_id":"json8@0.9.1","_shasum":"ae5e0c580a44038a32ba49732f23f8a2e2faa400","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.0","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"ae5e0c580a44038a32ba49732f23f8a2e2faa400","tarball":"https://registry.npmjs.org/json8/-/json8-0.9.1.tgz","integrity":"sha512-qs4F/racLkV7EHnA6/MyS5bL82Y1rmDf+LWo3hpXDVaWrI85fIjgC6blugs2kgN7PokyNoR5sp9Lk8pRge8h7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRDrWoQ3OcSFm9jNDh19DQ3mMWmqwusFR4fSbEhsbLfwIhAP3hjZj1LK13BwyzdCGpFsQL4JowlnuTobf+tfvFQcnK"}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/json8-0.9.1.tgz_1468940868064_0.22527473815716803"},"directories":{}},"0.9.2":{"name":"json8","version":"0.9.2","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/JSON8/JSON8","repository":{"type":"git","url":"git+https://github.com/json8/JSON8.git"},"bugs":{"url":"https://github.com/JSON8/JSON8/issues"},"main":"index.js","scripts":{"preversion":"npm test","prepublish":"npm run bundle","bundle":"browserify -s JSON8 index.js -o bundle.js","lint":"eslint .","unit":"mocha -r es6-collections --compilers js:babel-register --recursive test/","test":"npm run unit && npm run lint && npm run bundle"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","devDependencies":{"babel-preset-es2015":"^6.6.0","babel-register":"^6.5.1","es6-collections":"^0.5.6","eslint":"^1.10.3","eslint-config-atlas":"^1.0.2","eslint-config-bestpratices":"^1.0.7"},"gitHead":"1d4aac62c736d7b8b2aeaa8d8c3c71af5aec98e2","_id":"json8@0.9.2","_shasum":"dced62a24c8ed457702d45c71068081925c3011f","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.0","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"shasum":"dced62a24c8ed457702d45c71068081925c3011f","tarball":"https://registry.npmjs.org/json8/-/json8-0.9.2.tgz","integrity":"sha512-lbmeymMSGLRT30kzNHcbMdwTezxSXdujxv/XYtQgf207YCeUivOYyq54KqYKRgmA/3m5975D4T64DTQRpLbF8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGj+EFOnODeGWnQ+Oq4B2Byv9yCqLSD1r9Scb8ikXmywIgN4ZnIXps+1/HiO3Jre6NvGT0BQ73E07z/kSfNZiVDQI="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/json8-0.9.2.tgz_1468943865624_0.631937810452655"},"directories":{}},"1.0.1":{"name":"json8","version":"1.0.1","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/sonnyp/JSON8/tree/master/packages/json8","repository":{"type":"git","url":"git+https://github.com/JSON8/JSON8.git"},"bugs":{"url":"https://github.com/sonnyp/JSON8/issues"},"scripts":{"test":"mocha --recursive test/"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","engines":{"node":">= 7.6.0"},"gitHead":"0e306cc8ed5c3713ed3f51272720414d3e75d332","_id":"json8@1.0.1","_nodeVersion":"12.13.0","_npmVersion":"lerna/3.18.3/node@v12.13.0+x64 (linux)","dist":{"integrity":"sha512-asYT88KNocH7mrdRlThjj3DXImoalcclsrjTnpCquKJehd49f3GyKSZuhHgSMWAZ4RcJfyx2lytBYaSNbwpzxg==","shasum":"5247e3cc2c136569139a055266b5dd2d14ff849b","tarball":"https://registry.npmjs.org/json8/-/json8-1.0.1.tgz","fileCount":25,"unpackedSize":33871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtcErCRA9TVsSAnZWagAAhLsP/ibkaU9rmZjWlktAR68D\nmGMAV5ImtYjMF4uKW3Gk3oMBVIPW/njlyopyYyDksqUW/qOvF4n9669iTAXZ\n3UhqCHVphmYSXfWbcDjm63uIFhLVQD/URdSPWWQoSVS1aEskiDWQnQ98/eMT\nKXLEMkL9RD4SGSKeTfxPYkw4j1NoeRz1a3LZgElxBEcObpouni2FC6MVOpE1\noQZRo8/kfnJed7ABKbUQj7EPAWXe5ZofcB4f22WIAIy533ACdNzfqqVxPu7+\n8EwP0eIc4UkesWjU7yjtNjVrtQVczdLfrpl7h2NTPdqmP1zL+vLU+F4Dfkpe\ndis/5Ot66ZVM9Bx7kSDXvf0H/q1PG9ENRl07bhhpIJ+5HLfE0/YLUeSP6P+S\n+WwE5Iv2TojPknPDDO1ZA8lsAhDe4neoHRmRMeNDu7qa8Gp9IavLeDCaWa0x\nHgtaamV2pVRozxLyuKl6BBSRm9cu2T8JJa/djDHa6wm9dwyZh0TgI84NCIdS\nOoVBHJGgcBtTXJxumJGgsAE0pADspXUPB4ESgiW4xtIXGYZD8KiLgV+mWie+\nXa7qijAQuSeVBUqkGEmKZspISfEVkHtkS/apzNMUs8s8ImNnLMyQsoeNt/uD\ncoOgcArfo93idGP1IlOKG16RLOP9fyoA+ExmAet9H0VSuif/yvoUC+qVS2lu\naRBn\r\n=QoAl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7dqa9XZl2bX7GISOU3xIAsoJRlSwc/Rgx36stjYcUwAiEA5PuHD3tTn8rY+RnYcJyljFCz1qtNeOWAeZbS6xmOg3o="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json8_1.0.1_1572192555356_0.11732912698120712"},"_hasShrinkwrap":false},"1.0.2":{"name":"json8","version":"1.0.2","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/sonnyp/JSON8/tree/master/packages/json8","repository":{"type":"git","url":"git+https://github.com/JSON8/JSON8.git"},"bugs":{"url":"https://github.com/sonnyp/JSON8/issues"},"scripts":{"test":"mocha --recursive test/"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","engines":{"node":">= 7.6.0"},"gitHead":"6b196262bf791941c57609ff4f2ecae1cfac90e7","_id":"json8@1.0.2","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"integrity":"sha512-Mj4nRVGybbeRbDyZ/LIj///AP8pJX6cF1gmrmLjMzCTQatLuj9Wzt9IyTkxLxTDMo2wX88BxnjfoHtX16A/hIA==","shasum":"1855da13410d0794a2b19c331cb5c29d4681da39","tarball":"https://registry.npmjs.org/json8/-/json8-1.0.2.tgz","fileCount":25,"unpackedSize":33893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXOuKCRA9TVsSAnZWagAAARoP+wfKPZw2LnReIBXw1hA0\n3ukPNDinfAlXGl3+ez62oDuIZ+lwQUVJFnucvOCKfewNyzDi1XhMnN/GAQoq\nw1TrtXQta/B22Ew3WoAj40qVDTm+prCwHC/YgZQjsAJfPrp1yFQz40+YtQqa\nE5EEp1eFKlLu9hSEE/v+SO9LAcryfFLPFDJIeKOiIBCk+rG/08BLvNGPYEHc\n00jl2ynpyOSP0TUakEosHuVYVDEWgS2k5dE4a1rube+RZ3hjU+O2sdY3k8tc\nSAXkh2eDwD8Oeu5Plv07DMcrtCDftY++2Wi2LDFSuolj3QYHrQoSw1nqu8tl\n/jDZRZdHa5U592JmVP60tP3dvXk6WN87HKEFATQ6e2jabQo0N9PJwhnesqBo\nbiQu3vl9j2iFC72ZK4wfhlQDl5927c8odQi3n57wTd22bMarYpadNzJBbgC3\nVAUuR0i8iSe3Yu0kBxZztFNN9UYZ9nLrUWQEgxgBBNekIZh8jjrltLRNye15\n8tC1aorCLjwOzv4GK2Pu/AVk4uSo14VNd+p6Cl1xhj82x5IdWkbnE3U1tXLl\nwImaslNJNJUOerjSt6jU2Un76ONT/q7y++db2AxVsiT9qZxyZZn4xLnzm7+n\nBC3hju0Fvj2P1RPTDjViXf8kIsJ/E3SPB1+LoEn91J3YIy2t/ODmScEUr0/K\n755D\r\n=okTy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIACkxzOmU8Sr2fzxW+4tqmczkcdq9qwV5/eQ9x9nARYaAiEApbpQY1esqs+KyK+RhOK19hPSrfTta44vUFEBU/ziXyQ="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json8_1.0.2_1599925130484_0.2601247902080164"},"_hasShrinkwrap":false},"1.0.3":{"name":"json8","version":"1.0.3","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/sonnyp/JSON8/tree/master/packages/json8","repository":{"type":"git","url":"git+https://github.com/JSON8/JSON8.git"},"bugs":{"url":"https://github.com/sonnyp/JSON8/issues"},"scripts":{"test":"mocha --recursive test/"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","engines":{"node":">= 7.6.0"},"gitHead":"e069491061f23cebbba0c0e9709d1923335433d7","_id":"json8@1.0.3","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"dist":{"integrity":"sha512-rYGuGgWTmG0dzYwb137fIj5XWiezWBNhlyZpvf7okbHvCQ55X5S+1iuAIfzpPFGTYKkgLI8XX0wjsk/kse4jHA==","shasum":"3248f4effbf9b95700fbc3acaa9475b48a15843c","tarball":"https://registry.npmjs.org/json8/-/json8-1.0.3.tgz","fileCount":25,"unpackedSize":33893,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXd5HCRA9TVsSAnZWagAAkKEQAJwJhIKvuAeNpF2xdxk+\ncgayQLLKQ7G/e94o9B5z/7FoGvLol7YWfgqLbalAArhXY+YJZRo+cDcP/ZnY\nekiJJcQXlN16+fG5DlZnY5QbrHK807s620Fqb3oKiHxplewHWW3YhgOYnIEX\nu+OR9LPhyv3Yo4YolDPch11jtAE1542UsxBQTRkMg5UFqnEK7KN7SCikm93H\nBsvb31kJdUQeSNmReIkBY99JHDZ1ZndgUpM0KKcZc5NmuXXZhGrfyESTVMKz\nlLJ1DK4QGAPAsQYiqeqrzzp+JOOUgoznfsKKZuEBvB3ibTg+0FIr22wGsNyZ\nvdGlbxh5pquxBeASXHitz71twY2Q6vF5bEqBd+raTXFwZXWVyPzmYRZs11+K\ns4IJlG3ONw6WzfzFi+qz6W2YEKiQ5pX0c5tVB1QJH9AOoUVy5wN7tOoxNCrw\nnLa/F3PmXfPkhRDKYC3HXaw3DWHNGHHmQgKGCZ4k1fQIZtLqX0ba8YM2Ol5f\nkJ0+UA+iL1N/6k3227XbfBWHwRqhQrbxZmkDGTN2AsNXduMtCvBBNDwPF9KQ\nI/I+Tl+LdKrp4wJSIb2LnuAZGjWdZL3mhvBmsGjArPjRywuW6pssq/qmOn2q\no/aDsEUJrmzCUg0rnjKgG5kHf4YQvs0sp7jOWByqKYXiknWxda+29n88mlN+\n2q5q\r\n=h7OF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDKEhtpZEOVNotjSVBxEPm7ezlld62FTjrnGGVvjSIa2QIgEzAsh5z1XHZaPnUjRJYbE9yG6Ss2ZaGpe+QL8fDSP5k="}]},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json8_1.0.3_1599987270645_0.8107961338867837"},"_hasShrinkwrap":false},"1.0.5":{"name":"json8","version":"1.0.5","description":"JSON toolkit for JavaScript","keywords":["JSON","es6","es2015","map","set"],"homepage":"https://github.com/sonnyp/JSON8/tree/main/packages/json8","repository":{"type":"git","url":"git+https://github.com/sonnyp/JSON8.git"},"bugs":{"url":"https://github.com/sonnyp/JSON8/issues"},"scripts":{"test":"mocha --recursive test/"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"license":"ISC","engines":{"node":">= 7.6.0"},"gitHead":"306bf26397e6edecfb82d7a48de58bfc1f6abef8","_id":"json8@1.0.5","_nodeVersion":"14.17.0","_npmVersion":"lerna/4.0.0/node@v14.17.0+x64 (linux)","dist":{"integrity":"sha512-TnyzPW+84OwR9znGJ1DeJkucxkCEP37vNLoPuK7p0VJ3MrjhxgW+t+AbkW9vfNzxMv0tIDvzOYS1rJ7eUdcTwA==","shasum":"a3fc51e5406489632eb87a85dbe6cbb8c200c1be","tarball":"https://registry.npmjs.org/json8/-/json8-1.0.5.tgz","fileCount":25,"unpackedSize":33898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL0EGCRA9TVsSAnZWagAAc2gQAIgQ7boIYUEs0aEa9+OG\nx2DnSFvVLoro1wI5cMmawXLJbGtZbrV5iqe6+T5pbB58uG7q7zmfeU0bJRAg\nnvjogObdHpjA5Df0FY7b/X2aFg+lTCgx8SpeLYZyvvBuhJ9Wu6npCyhySiVA\nZGd0ABYFNKdVZuh7En9zjvM2ECyp04IvsGsj5tihJK7qagcKCX934yc301LA\nng3mcIOu5XWjSfW5Lsr8G4C9gloDQHiYYnKG1cIvWyYDda5/ulmEQVfR7RuJ\nbqpNQNC12nDwJpoVzX+JcbKGY0hoGQ75g9yfrpwa4+K2TsXogHUqTqXxZ8x3\nCdFTpbe+NoVyyT7Lumk0yx7i2jE6yTsnQvcqXAoPVushoW29SHB1wMfKLEbb\ni9bTYZESxuJESw4LqrATT1Q00M6t2QvbNVZQiCkRvlKFte0fP6MQYqzwTKgr\n/USntUWGc+MuP2EdufWNeC962KBFmvXqdx4w25Y/RQbmo01GQexKUlc3SRKg\nxi7QLDO/rqJXfmyJbHnDNc9PVZhR4P9ozq0y3vWv5w9Y9KFtgBBEEZfQfzvI\nMgwsQ5vEBAWKrRVJrzwDe3aXHUCZOmTfPIB427ZDoHauIeclRWff1QKiWJGO\nFcG1HD85Z+0ZE0VN/qWL6VLUKGuAghrQahFiW2s/0CRfj0QO4uqoJ3c+yC1S\nIEbe\r\n=QQh8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1B0hEjIDGmqfsbV6lOpGdrDc83qboYUQJov61rbhx3AiA2M7fuSW1tnIqovqc3LztN0QiAakyEU2NlI1UjtoFVQg=="}]},"_npmUser":{"name":"sonny","email":"sonny@fastmail.net"},"directories":{},"maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json8_1.0.5_1630486790247_0.036387004720271454"},"_hasShrinkwrap":false}},"readme":"# JSON8\n\n# Introduction\n\nJSON8 is a JavaScript library that makes working with JSON/data/structures safer and easier.\n\nFeatures\n\n- Strong JSON and type validation\n- Full support for [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)\n- Support Node.js/\n  and browsers; [es5-shim](https://github.com/es-shims/es5-shim) for < IE 9, [JSON polyfill](https://bestiejs.github.io/json3/) for < IE 8\n- [Smarter and safer JSON serializer/stringify](#ooserialize)\n- See [Methods](#methods) and [Motivations](#motivations)\n- [Tested](https://travis-ci.org/JSON8/JSON8/branches)\n- Small, no dependencies\n- Modular, save bandwith/memory by requiring needed methods using `require('json8/lib/METHOD_NAME')`\n\nSee also\n\n- [JSON8 Patch](https://github.com/sonnyp/JSON8/tree/main/packages/patch) for JSON diffing and patching\n- [JSON8 Pointer](https://github.com/sonnyp/JSON8/tree/main/packages/pointer) for JSON Pointer (URL for JSON) implementation\n- [JSON8 Merge Patch](https://github.com/sonnyp/JSON8/tree/main/packages/merge-patch) for simpler but less capable JSON object diffing/patching alternative to JSON Patch and Pointer\n\n---\n\n- [Introduction](#introduction)\n- [Getting started](#getting-started)\n- [Methods](#methods)\n  - [oo](#oo)\n  - [oo.clone](#ooclone)\n  - [oo.equal](#ooequal)\n  - [oo.type](#ootype)\n  - [oo.is](#oois)\n    - [structure](#structure)\n    - [primitive](#primitive)\n    - [object](#object)\n    - [array](#array)\n    - [number](#number)\n    - [string](#string)\n    - [boolean](#boolean)\n    - [null](#null)\n    - [JSON](#json)\n  - [oo.hasKey](#oohaskey)\n  - [oo.hasValue](#oohasvalue)\n  - [oo.has](#oohas)\n  - [oo.valid](#oovalid)\n  - [oo.serialize](#ooserialize)\n  - [oo.parse](#ooparse)\n- [oo.Document](#oodocument)\n- [Motivations](#motivations)\n\n# Getting started\n\n`npm install json8`\n\n---\n\n```javascript\nconst oo = require(\"json8\");\n```\n\n[↑](#json8)\n\n# Methods\n\n## oo\n\nReturns an [oo.Document](#oodocument).\n\n```javascript\nvar doc = oo(false);\ndoc instanceof oo.Document; // true\ndoc.isBoolean(); // true\ndoc.isPrimitive(); // true\n// ...\n```\n\n[↑](#json8)\n\n## oo.clone\n\nDeep clone any value.\n\n```javascript\nvar doc = { foo: \"bar\" };\nvar clone = oo.clone(doc); // {\"foo\":\"bar\"}\ndoc === copy; // false\noo.equal(doc, copy); // true\n\noo.clone(true); // true\noo.clone(42); // 42\noo.clone(-0); // -0\n```\n\n[↑](#json8)\n\n## oo.equal\n\nTest for JSON equality between two documents.\n\n```javascript\noo.equal(true, true)     // true\noo.equal([], [])         // true\noo.equal({}, {})         // true\noo.equal(\n  {foo: 'bar', bar: 'foo'}\n  {bar: 'foo', foo: 'bar'}\n)                        // true\noo.equal(new Set([1, 2]), new Set([1, 2])) // true\noo.equal(new Set([2, 1]), new Set([1, 2])) // false\n\noo.equal(new Set(), []) // true\noo.equal(new Map(), {}) // true\n\noo.equal([1, 2], [2, 1]) // false\n\noo.equal(-0, +0) // false\n```\n\n[↑](#json8)\n\n## oo.type\n\nReturns the JSON type for a value, `undefined` if the value is not of any JSON type.\n\n```javascript\noo.type({}); // 'object'\noo.type(new Map()); // 'object'\noo.type([]); // 'array'\noo.type(new Set()); // 'array'\noo.type(42); // 'number'\noo.type(\"foo\"); // 'string'\noo.type(null); // 'null'\noo.type(true); // 'boolean'\n\noo.type(undefined); // undefined\noo.type(Infinity); // undefined\noo.type(-Infinity); // undefined\noo.type(NaN); // undefined\noo.type(Symbol()); // undefined\noo.type(function () {}); // undefined\n```\n\n[↑](#json8)\n\n## oo.is\n\nFor each type you can use the syntax\n\n```javascript\noo.is(\"foo\", type);\n```\n\nor\n\n```javascript\noo.isType(\"foo\");\n```\n\nWhere type is any of:\n\n- [structure](#structure)\n- [primitive](#primitive)\n- [object](#object)\n- [array](#array)\n- [number](#number)\n- [string](#string)\n- [boolean](#boolean)\n- [null](#null)\n- [JSON](#json)\n\n`oo.is(value, type)` throws an error if `type` is not one of those.\n\n#### structure\n\nReturns true for arrays and objects, false otherwise.\n\n```javascript\noo.is({}, \"structure\"); // true\noo.isStructure([]); // true\noo.isStructure(new Set()); // true\noo.isStructure(new Map()); // true\n\noo.isStructure(null); // false\n```\n\n[↑](#json8)\n\n#### primitive\n\nReturns true for primitives, false otherwise.\nPrimitives are: number, boolean, null, string.\n\n```javascript\noo.is(null, 'primitive') // true\noo.isPrimitive(true)     // true\noo.isPrimitive('foo')    // true\noo.isPrimitive(42)       // true\n\noo.isPrimitive([]])      // false\noo.isPrimitive({})       // false\noo.isPrimitive(undefined)// false\noo.isPrimitive(Infinity) // false\noo.isPrimitive(NaN)      // false\n```\n\n[↑](#json8)\n\n#### object\n\nReturns true for object, false otherwise.\n\n```javascript\noo.is({}, \"object\"); // true\noo.isObject({}); // true\noo.isObject(new Map()); // true\n\noo.isObject(null); // false\noo.isObject([]); // false\noo.isObject(null); // false\noo.isObject(function () {}); // false\noo.isObject(new Set()); // false\n```\n\n[↑](#json8)\n\n#### array\n\nReturns true for array, false otherwise.\n\n```javascript\noo.is([], \"array\"); // true\noo.isArray([]); // true\noo.isArray(new Set()); // true\n\noo.isArray({}); // false\noo.isArray(new Map()); // false\n```\n\n[↑](#json8)\n\n#### number\n\nReturns true for number, false otherwise.\n\n```javascript\noo.is(42, \"number\"); // true\noo.isNumber(4.2); // true\noo.isNumber(-42); // true\n\noo.isNumber(Infinity); // false; Infinity is not valid JSON\noo.isNumber(-Infinity); // false; -Infinity is not valid JSON\noo.isNumber(NaN); // false; NaN is not valid JSON\n```\n\n[↑](#json8)\n\n#### string\n\nReturns true for string, false otherwise.\n\n```javascript\noo.is('foo', 'string') // true\noo.isString('☕'️)       // true\noo.isString('')        // true\n\noo.isString(42)        // false\noo.isString(undefined) // false\noo.isString(null)      // false\n```\n\n[↑](#json8)\n\n#### boolean\n\nReturns true for boolean, false otherwise.\n\n```javascript\noo.is(true, \"boolean\"); // true\noo.isBoolean(false); // true\n\noo.isBoolean(0); // false\noo.isBoolean(\"foo\"); // false\n```\n\n[↑](#json8)\n\n#### null\n\nReturns true for null, false otherwise.\n\n```javascript\noo.is(null, \"null\"); // true\noo.isNull(null); // true\n\noo.isNull(undefined); // false\n```\n\n[↑](#json8)\n\n#### JSON\n\nReturns true for any JSON valid value.\nJSON valid values are: number, boolean, null, string, array, object.\n\nThis method is not recursive, if you need to deep check for validity use the [oo.valid method](#oovalid).\n\n```javascript\noo.is(true, \"JSON\"); //true\noo.isJSON(\"foo\"); //true\noo.isJSON(null); //true\noo.isJSON({}); //true\noo.isJSON([]); //true\noo.isJSON(42); //true\noo.isJSON(new Map()); //true\noo.isJSON(new Set()); //true\n\noo.isJSON(undefined); //false\noo.isJSON(NaN); //false\noo.isJSON(Infinity); //false\noo.isJSON(-Infinity); //false\noo.isJSON(function () {}); //false\n```\n\n[↑](#json8)\n\n## oo.hasKey\n\nIterates over a JSON object (Map or Object) until an [equal](#ooequal) JSON key is found.\n\nReturns true if the JSON object (Map or Object) contains an equal key.\nReturns false if the key is not a string.\nReturns false if the value at the key is undefined.\n\n```javascript\noo.hasKey({ foo: \"bar\" }, \"foo\"); // true\noo.hasKey({ undefined: \"bar\" }, undefined); // false\noo.hasKey({ foo: undefined }, \"foo\"); // false\nvar obj = {};\nobj[{}] = \"foo\";\noo.hasKey(obj, {}); // false\n\nvar map = new Map();\nmap.set(\"foo\", \"bar\");\noo.hasKey(map, \"foo\"); // true\nmap.set(undefined, \"bar\");\noo.hasKey(map, undefined); // false\nmap.set(\"foo\", undefined);\noo.hasKey(map, \"foo\"); // false\nmap.set({}, \"foo\");\noo.hasKey(map, {}); // true\n```\n\n[↑](#json8)\n\n## oo.hasValue\n\nIterates over a JSON structure (Array or Object) until an [equal](#ooequal) JSON value is found.\n\nReturns true if the JSON structure contains an equal value.\nReturns false if the value or the key for the value is undefined.\n\n```javascript\noo.hasValue({ foo: \"bar\" }, \"bar\"); // true\noo.hasValue({ foo: {} }, {}); // true\noo.hasValue({ undefined: \"bar\" }, bar); // false\noo.hasValue({ foo: undefined }, undefined); // false\n\nvar map = new Map();\nmap.set(\"foo\", \"bar\");\noo.hasKey(map, \"bar\"); // true\nmap.set(undefined, \"bar\");\noo.hasKey(map, \"bar\"); // false\nmap.set(\"foo\", undefined);\noo.hasKey(map, undefined); // false\n```\n\n## oo.has\n\nIf the provided structure is a JSON array (Set or Array) returns the result of hasValue with the given arguments.\nIf the provided structure is a JSON object (Map or Object) returns the result of hasKey with the given arguments.\nOtherwise returns false.\n\n[↑](#json8)\n\n## oo.valid\n\nRecursive version of [is JSON](#json), works on primitive values as well.\n\n```javascript\noo.valid(true); //true\noo.valid({ foo: \"bar\" }); //true\n\noo.valid({ foo: undefined }); //false\noo.valid({ foo: NaN }); //false\noo.valid([\"bar\", function () {}]); //false\n```\n\n[↑](#json8)\n\n## oo.serialize\n\nTakes a JSON document and returns a parseable JSON string. Uses `JSON.stringify` underneath so it's still fast.\n\nAlways use try/catch with oo.serialize.\n\nDifferences with [JSON.stringify](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n- Throws a TypeError for any invalid JSON value encountered such as\n  - `undefined`\n  - `Infinity`\n  - `-Infinity`\n  - `NaN`\n  - `symbols`\n  - `functions`\n- Works with [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) (serialized as JSON object)\n- Works with [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) (serialized as JSON array)\n- Serializes signed zeros `-0` as `\"-0\"` while JSON.stringify returns `\"0\"`\n- Options are provided as an object instead of arguments\n\nOptions\n\n- `toJSON` set to false disable [toJSON behavior](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior>) (defaults to true)\n- `space` same as JSON.stringify [space argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_space_argument)\n- `replacer` same as JSON.stringify [replacer argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The_replacer_parameter) but remove the value from the array if `undefined` is returned\n- `maxIndentLevel` set a maximum level (depth) of indentation\n\n```javascript\noo.serialize(doc[, options]);\n\noo.serialize({\"foo\": \"bar\"})\n// {\"foo\":\"bar\"}\n\n/*\n * Set serialization\n */\nvar set = new Set()\nset.add('hello')\noo.serialize(set)\n// [\"hello\"]\n\n/*\n * Map serialization\n */\nvar map = new Map()\nmap.set('foo', 'bar')\noo.serialize(map)\n// {\"foo\":\"bar\"}\n\n/*\n * toJSON option\n */\noo.serialize(new Date())\n// \"2015-10-21T16:29:00.000Z\"\noo.serialize(new Date(), {toJSON: false})\n// {}\n\n/*\n * space option\n */\nvar obj = {foo: 'bar'}\noo.serialize(obj)\n// {\"foo\":\"bar\"}\noo.serialize(obj, {space: 2})\n// {\n//   \"foo\": \"bar\"\n// }\n\n/*\n * maxIndentLevel\n */\nvar obj = {foo: ['0', '1', '2']}\noo.serialize(obj, {space: 2, maxIndentLevel: 1})\n// {\n//   \"foo\": ['0', '1', '2'] // without maxIndentLevel, each value would be on a newline\n// }\n```\n\n[↑](#json8)\n\n## oo.parse\n\nTakes a JSON string and returns a JavaScript value.\n\nAlways use try/catch with oo.parse.\n\n```javascript\nvar doc = oo.parse(string[, options]);\n```\n\n`options.set` to parse JSON arrays as Set (default false).\n`options.map` to parse JSON objects as Map (default false).\n\n[↑](#json8)\n\n## oo.Document\n\nAn oo.Document is a constructor that wraps a value and expose oo methods.\n\nYou can use either `oo(value)` or `new oo.Document(value)`.\n\n```javascript\nvar doc = oo(\"hello\");\ndoc instanceof oo.Document; // true\ndoc.isString(); // true\nvar clone = doc.clone(); // oo.Document\ndoc.equal(clone); // true\n```\n\n[↑](#json8)\n\n# Motivations\n\n## Types\n\nGetting/asserting the JSON type of a value in JavaScript is troublesome.\n\n- [oo.type](#ootype) returns the JSON type of any value\n\n- [oo.is](#oois) checks if a value is of the provided type\n\n- [oo.isStructure](#ooisStructure) checks if a value is a JSON structure (an array or an object)\n\n- [oo.isPrimitive](#ooisPrimitive) checks if a value is a JSON primitive (null, boolean, string, number)\n\n- [oo.isJSON](#json) checks if the value is a JSON valid value\n\n[↑](#json8)\n\n## Safety\n\n[oo.serialize](#ooserialize) will throw an exception for any non JSON valid value (undefined, NaN, Infinity, -Infinity, ...) instead of ignoring it or replacing it with `null` like JSON.striginfy does. It also accept an optional argument to disable [toJSON behavior](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior>) which is a common pitfall. Additionally it encodes [invalid JavaScript characters](http://timelessrepo.com/json-isnt-a-javascript-subset).\n\nJSON8 [types](#types) helps avoiding many common errors as well.\n\n[oo.equal](#ooequal) performs deep JSON equality comparaison\n\n[oo.valid](#oovalid) performs recursive JSON validation on any value\n\n[↑](#json8)\n\n## Map and Set\n\n[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) are new structures available in ES6. Both are serializable and parseable as JSON, Map as object and Set as array. JSON8 was designed with that in mind and every single method supports Map and Set, a few examples:\n\n- [isArray](#array) returns `true` for Set\n- [isObject](#object) returns `true` for Map\n- [valid](#oovalid), [isStructure](#structure), [isJSON](#json) return `true` for Map and Set\n- [type](#ootype) returns `'array'` for Set and `'object'` for Map\n- [serialize](#ooserialize) stringifies Set as array and Map as object\n- [parse](#ooparse) optionally parses arrays as Set and objects as Map\n\n[↑](#json8)\n\n## Comparisons\n\n```javascript\n// undefined is not JSON valid\nJSON.stringify(undefined); // undefined\noo.serialize(undefined); // TypeError\n\nJSON.stringify({ foo: undefined }); // '{}'\noo.serialize({ foo: undefined }); // TypeError\n\nJSON.stringify([undefined]); // '[null]'\noo.serialize([undefined]); // TypeError\n\n// same applies for NaN, Infinity and -Infinity\ntypeof NaN; // 'number'\noo.type(NaN); // undefined\n\nJSON.stringify(NaN); // 'null'\nJSON.stringify({ foo: NaN }); // '{\"foo\":null}'\nJSON.stringify([NaN]); // '[null]'\noo.serialize(NaN); // TypeError\n\n// typeof null returns 'object'\ntypeof null; // 'object'\noo.type(null); // 'null'\n\n// arrays\nvar array = [];\ntypeof []; // 'object'\noo.type(array); // 'array'\narray[2] = \"foo\";\narray[1]; // undefined\narray[0]; // undefined\nJSON.stringify(array); // '[null,null,\"foo\"]'\noo.serialize(array); // TypeError\n\n// functions\nJSON.stringify(function () {}); // undefined\nJSON.stringify({ foo: function () {} }); // '{}'\nJSON.stringify([function () {}]); // '[null]'\noo.serialize(function () {}); // TypeError\n\n// Set\nvar set = new Set();\ntypeof set; // 'object'\noo.type(set); // 'array'\n\nset.add(\"foo\");\nJSON.stringify(set); // '{}'\noo.serialize(set); // '[\"foo\"]'\n\n// Map\nvar map = new Map();\ntypeof map; // 'object'\noo.type(map); // 'object'\n\nmap.set(\"foo\", \"bar\");\nJSON.stringify(map); // '{}'\noo.serialize(map); // '{\"foo\": \"bar\"}'\n\n// typeof Date returns 'object' but JSON.stringify returns a string\ntypeof new Date(); // 'object'\nJSON.stringify(new Date()); // '2015-10-21T16:29:00.000Z'\noo.type(new Date()); // 'object'\noo.serialize(new Date(), { toJSON: false }); // '{}'\noo.serialize(new Date()) - // '2015-10-21T16:29:00.000Z'\n  // -0\n  0 ===\n  0; //  true\noo.equal(-0, 0); //  false\n\nJSON.parse(\"-0\"); //  -0\nJSON.stringify(-0); //  \"0\"\n\noo.parse(\"-0\"); //  -0\noo.serialize(-0); // \"-0\"\n```\n\n[↑](#json8)\n","maintainers":[{"name":"sonny","email":"sonny@fastmail.net"}],"time":{"modified":"2022-06-19T06:33:42.055Z","created":"2015-07-05T23:28:49.297Z","0.1.0":"2015-07-05T23:28:49.297Z","0.2.0":"2015-07-25T17:30:22.829Z","0.3.0":"2015-08-14T21:47:08.995Z","0.4.0":"2015-08-14T23:38:50.999Z","0.5.0":"2015-08-16T02:45:37.231Z","0.6.0":"2015-08-16T16:03:17.787Z","0.7.0":"2015-08-16T16:46:52.984Z","0.8.0":"2015-09-16T17:28:39.006Z","0.8.1":"2015-11-08T16:53:29.611Z","0.8.2":"2015-12-17T21:29:51.471Z","0.9.0":"2016-05-02T14:44:11.700Z","0.9.1":"2016-07-19T15:07:50.099Z","0.9.2":"2016-07-19T15:57:46.774Z","1.0.1":"2019-10-27T16:09:15.490Z","1.0.2":"2020-09-12T15:38:50.603Z","1.0.3":"2020-09-13T08:54:30.836Z","1.0.5":"2021-09-01T08:59:50.436Z"},"homepage":"https://github.com/sonnyp/JSON8/tree/main/packages/json8","keywords":["JSON","es6","es2015","map","set"],"repository":{"type":"git","url":"git+https://github.com/sonnyp/JSON8.git"},"author":{"name":"Sonny Piers","email":"sonny@fastmail.net"},"bugs":{"url":"https://github.com/sonnyp/JSON8/issues"},"license":"ISC","readmeFilename":"README.md","users":{"nelix":true}}