{"_id":"tiny-jsonc","_rev":"298343","name":"tiny-jsonc","description":"An absurdly small JSONC parser.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"fabiospampinato","email":""}],"time":{"modified":"2024-01-15T13:42:46.000Z","created":"2023-01-19T17:41:00.231Z","1.0.1":"2023-01-19T18:32:22.341Z","1.0.0":"2023-01-19T17:41:00.231Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/jsonc-simple-parser.git"},"versions":{"1.0.1":{"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.1","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":"ffc4641b00523ae15e6c9f6a99fd52392cf95b8b","bugs":{"url":"https://github.com/fabiospampinato/jsonc-simple-parser/issues"},"homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","_id":"tiny-jsonc@1.0.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"shasum":"71de47c9d812b411e87a9f3ab4a5fe42cd8d8f9c","size":48889,"noattachment":false,"key":"/tiny-jsonc/-/tiny-jsonc-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/tiny-jsonc/download/tiny-jsonc-1.0.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-jsonc_1.0.1_1674153142127_0.7310175636942973"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-19T18:32:22.341Z","publish_time":1674153142341,"_cnpm_publish_time":1674153142341},"1.0.0":{"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":{"shasum":"914e7abcc790c7954838fb68bb5aaffe021a68e6","size":49603,"noattachment":false,"key":"/tiny-jsonc/-/tiny-jsonc-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/tiny-jsonc/download/tiny-jsonc-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-jsonc_1.0.0_1674150060049_0.7049154179345616"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-19T17:41:00.231Z","publish_time":1674150060231,"_cnpm_publish_time":1674150060231}},"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","_attachments":{},"homepage":"https://github.com/fabiospampinato/jsonc-simple-parser#readme","bugs":{"url":"https://github.com/fabiospampinato/jsonc-simple-parser/issues"}}