{"name":"tiny-jsonc","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/jsonc-simple-parser.git"},"description":"An absurdly small JSONC parser.","version":"1.0.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"npm run clean && npm run compile && npm run test"},"keywords":["jsonc","json","comments","trailing commas","commas","parser","parse"],"devDependencies":{"benchloop":"^2.0.0","esbuild":"^0.17.3","fava":"^0.0.7","json5":"^2.2.3","jsonc-parser":"^3.2.0","jsonc-simple-parser":"^3.0.0","lodash":"^4.17.21","tsex":"^1.1.4","type-fest":"^3.5.2","typescript":"^4.9.4"},"gitHead":"65845d82978d1b61fd2b1084fcf15001485f802b","bugs":{"url":"https://github.com/fabiospampinato/jsonc-simple-parser/issues"},"homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"tiny-jsonc@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-6Q0EV+qZVjEmqLpG3Ax894P2CDjJcXdEG7U5NAVsAyHZhMj9xIFsQ8evFo+04TnZ2g5/H0arjMDey2QOPwiGxQ==","shasum":"914e7abcc790c7954838fb68bb5aaffe021a68e6","tarball":"http://registry-npm.ywwl.com/tiny-jsonc/download/tiny-jsonc-1.0.0.tgz","fileCount":14,"unpackedSize":207739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+OsFu26v4JoDL/+9ufzh0JW2LLDQOH3I99BW/xNi4IAIgCYJmS0su5MzfZYvoQECOiPLx7+GB5QuYsk130dOs0MI="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyYCsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxPA//QbJFekLI6sOUkoNqMA8FyTaiD1Oz3eh8cWWdubn3O1TJnimW\r\nHaqwuA+BLSy+eF7xbJNVsBrO+lByYKqro4LknGRPx4K2ubAOCxlqFzjoKLq2\r\nkYlCWqv8W/1WSjVWKnoyI9YrNSkF2ARmCZAukfNvfmD4Y3eiwYpZQ2ixQPKB\r\nzxe2Qh3xA1nIp5CBPm5tZElN3LkTCgPoddSLAkbAMoLDSzgz68b2JTm9fZ6v\r\nUKkB7s+3kpyBLpsNw3P3OZvefRfTk802ksDq590YuUuK453MK2OiN6zBL4nb\r\n8awi+dFzT5/wnYLDbWQNZzHV0gfXx5OXTeBZ2yCZUe9co5VGYU8796WEgRoO\r\nZHJK/jmV+foUFYFmZD3xidDZXO1OTT7DgGfme5gyYOP8bHy4tYRgregKDZnm\r\nW5y8T8ZzKxlCiXY42GEeb0a3APtICVRR00RXKpCwiVnacAkz47F+1BR1tAVk\r\ndvfXS51MQwxQuu+yGv/YZAhCWVoh7W4LfUf4R8hsjaQ6a72Xl1kuAvE7pYdd\r\n45YPoQVKoV2mkJ+C5Tf2TEnpqPD8RQ/U5GvqpPyeOR3Uh53aLmthb4FpfjT4\r\nXKDn/tS6mAEBesxXn4LkZJW2SfKgHF71HZnw3Dyz6O1HPgL6unKXFn17puGR\r\nRIlyHmsu08q1eCql+MuZisbeGzUFLmm3yyo=\r\n=j2jZ\r\n-----END PGP SIGNATURE-----\r\n","size":49603,"noattachment":false,"key":"/tiny-jsonc/-/tiny-jsonc-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-jsonc_1.0.0_1674150060049_0.7049154179345616"},"_hasShrinkwrap":false,"readme":"# Tiny JSONC\n\nAn absurdly small JSONC parser.\n\nThis library works simply by using regexs to strip out comments first and trailing commas second, in order to account for a trailing comma followed by a comment, and then just passing the output to `JSON.parse`.\n\nIf you need additional APIs to manipulate JSONC, better error messages, or a full-blown parser, I'd recommend using [`json-simple-parser`](https://github.com/fabiospampinato/jsonc-simple-parser) instead.\n\n## Install\n\n```sh\nnpm install --save tiny-jsonc\n```\n\n## Usage\n\n```ts\nimport JSONC from 'tiny-jsonc';\n\nconst source = `\n  { // This is an example\n    \"foo\": 123,\n    /* TRAILING COMMAS */\n    \"bar\": [1, 2, 3,],\n  }\n`;\n\nconst result = {\n  foo: 123,\n  bar: [1, 2, 3]\n};\n\nJSONC.parse ( source ); // => returns an object that's deeply equal to `result`\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1674150060231,"_cnpm_publish_time":1674150060231,"dist-tags":{"latest":"1.0.2"}}