{"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":{"integrity":"sha512-ik6BCxzva9DoiEfDX/li0L2cWKPPENYvixUprFdl3YPi4bZZUhDnNI9YUkacrv+uIG90dnxR5mNqaoD6UhD6Bw==","shasum":"71de47c9d812b411e87a9f3ab4a5fe42cd8d8f9c","tarball":"http://registry-npm.ywwl.com/tiny-jsonc/download/tiny-jsonc-1.0.1.tgz","fileCount":14,"unpackedSize":195837,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHOfXHhU3G31DXhFRkrxwYaWOLwfonWXzKZTIvJZjLZQIhAMD7H3fiZDnvU7uAxwyrhvDa8fC2495k7WBNY+7em/a7"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyYy2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqSg//TkFy2ngjrnfrdwa7TarDzP/8alQUZB11P1yhQmGic/WsKKAY\r\nwPNqS+ESw8Kg3t4mkeeHNS1GK+y25OGnDjpyoCbzx7QB5uCBouNQkWqvOhIO\r\nBER0ISH9wGAXV8+F4oEMP6/5Ur8O9GcxwPU0wXhIGeCo57XCxv/CQnZHMO/r\r\noeFEqy7CpMTE9Z4c+3PV7gXqQQ8zwMzoBRvu9p4Z3t5inwb16z6scmg7XVCk\r\n6scaFcDZBu7iRkKm9O4eoOtb6+va/ujnyp7Bba1CwE0Yl2/RndZYEQOjzxuB\r\nwwly/qj//ujB5w/dNBuPxyD81b1QSQzuNALB5zQlN9c79hpISj7zJtGUxwaC\r\nk9dH2Z4PfxVmk4REoHZ4v9YfjClOdLkxZGgb6ZQ+q/wOoWJM9EjyGPwkGBPO\r\nE0lUIdLCHsZ7qGKR1if5tH2/cxCRD3qIxB5CKcPlG8QWf6bbNWtFdkkArJKG\r\nCGY/DyJ8aewDmUZ9/r1nlNU2lQgNQf21kh7CvjkjEt8EAmVGniJco9iPHw5/\r\n05gnXqZ2rwHPL8Insnw6iH9eQgWWhLZ+Ar51cCSi18t2kCCEHZ8vjRZAEK1w\r\n9Gjl4/e+ciJJERdTIIZ4+69206WAA1d1lz6dPC2suEueR4SqduUu5DtOxNGh\r\n5YQh7IgPyoFnDDddZ1t3lgJB7cdcJkKs0QQ=\r\n=pIlj\r\n-----END PGP SIGNATURE-----\r\n","size":48889,"noattachment":false,"key":"/tiny-jsonc/-/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,"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":1674153142341,"_cnpm_publish_time":1674153142341,"dist-tags":{"latest":"1.0.2"}}