{"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":{"integrity":"sha512-f5QDAfLq6zIVSyCZQZhhyl0QS6MvAyTxgz4X4x3+EoCktNWEYJ6PeoEA97fyb98njpBNNi88ybpD7m+BDFXaCw==","shasum":"208df4c437684199cc724f31c2b91ee39c349678","tarball":"http://registry-npm.ywwl.com/tiny-jsonc/download/tiny-jsonc-1.0.2.tgz","fileCount":5,"unpackedSize":3465,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDa5yOehXjmBjgz04QaG1bETQfnKgs5DLNFB/taJpCEGAiBXbxbqWKjHzMRRBtWmMm/s84hRW64JcYQwucfSbMJzDQ=="}],"size":1940,"noattachment":false,"key":"/tiny-jsonc/-/tiny-jsonc-1.0.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tiny-jsonc_1.0.2_1737158803720_0.7910845484290077"},"_hasShrinkwrap":false,"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","publish_time":1737158803931,"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_cnpm_publish_time":1737158803931,"dist-tags":{"latest":"1.0.2"}}