{"_id":"tiny-jsonc","_rev":"3757963","name":"tiny-jsonc","description":"An absurdly small JSONC parser.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"time":{"modified":"2025-03-18T07:12:39.000Z","created":"2023-01-19T17:41:00.231Z","1.0.2":"2025-01-18T00:06:43.931Z","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/tiny-jsonc.git"},"versions":{"1.0.2":{"name":"tiny-jsonc","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-jsonc.git"},"description":"An absurdly small JSONC parser.","license":"MIT","version":"1.0.2","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":"tsex prepare"},"keywords":["jsonc","json","comments","trailing commas","commas","parser","parse"],"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.4","jsonc-simple-parser":"^3.0.0","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"tiny-jsonc@1.0.2","gitHead":"bb722089210174ec9cb53afcce15245e7ee21b9a","bugs":{"url":"https://github.com/fabiospampinato/tiny-jsonc/issues"},"homepage":"https://github.com/fabiospampinato/tiny-jsonc#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"shasum":"208df4c437684199cc724f31c2b91ee39c349678","size":1940,"noattachment":false,"key":"/tiny-jsonc/-/tiny-jsonc-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/tiny-jsonc/download/tiny-jsonc-1.0.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tiny-jsonc_1.0.2_1737158803720_0.7910845484290077"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-18T00:06:43.931Z","publish_time":1737158803931,"_source_registry_name":"default","_cnpm_publish_time":1737158803931},"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://registry.cnpm.dingdandao.com/tiny-jsonc/download/tiny-jsonc-1.0.1.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.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://registry.cnpm.dingdandao.com/tiny-jsonc/download/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,"_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 regexes 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 [`jsonc-simple-parser`](https://github.com/fabiospampinato/jsonc-simple-parser) instead.\n\n## Install\n\n```sh\nnpm install 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/tiny-jsonc#readme","bugs":{"url":"https://github.com/fabiospampinato/tiny-jsonc/issues"},"license":"MIT"}