{"_id":"codemirror-json5","_rev":"3-357cf264f3d9303a054c7ed2922c73c9","name":"codemirror-json5","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"codemirror-json5","version":"1.0.0","description":"JSON5 support for Codemirror 6","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"keywords":["Codemirror","editor","code","json5"],"author":{"name":"Daniel Imfeld","email":"dimfeld"},"license":"MIT","dependencies":{"@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","json5":"^2.2.1","lezer-json5":"^2.0.1"},"devDependencies":{"@codemirror/buildhelper":"^0.1.5","@codemirror/lint":"^6.0.0","@lezer/lr":"^1.0.0","typescript":"~4.9.4"},"repository":{"type":"git","url":"git+https://github.com/dimfeld/codemirror-json5.git"},"scripts":{"test":"cm-runtests"},"bugs":{"url":"https://github.com/dimfeld/codemirror-json5/issues"},"homepage":"https://github.com/dimfeld/codemirror-json5#readme","_id":"codemirror-json5@1.0.0","_integrity":"sha512-OTdDFWlX13vOTGYH1p9SRJtQx4Ija4DMmQlDkJtF7CETKTdpwCMbcPPvUWCx+WHoNuRTLIWMiCA897+AHPgwIA==","_resolved":"/tmp/b737a841dd3ecaefd6fd4de2ac76ddab/codemirror-json5-1.0.0.tgz","_from":"file:codemirror-json5-1.0.0.tgz","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-OTdDFWlX13vOTGYH1p9SRJtQx4Ija4DMmQlDkJtF7CETKTdpwCMbcPPvUWCx+WHoNuRTLIWMiCA897+AHPgwIA==","shasum":"a74191cd4a6cd99a05a0ee2f6ab6f29f7c169a57","tarball":"https://registry.npmjs.org/codemirror-json5/-/codemirror-json5-1.0.0.tgz","fileCount":7,"unpackedSize":26817,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1qHSkxvjqmRcr3L9UxnEt1O+dE+tC4lxBaoBvHuJuzAIhAP1ONDUxJ/14cUH8LrJwwv2p/VhDrxs6rDuzVtULSwyZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlPNtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnZg//aNE651Wkv4158oQTqISonXKZfXvIquaeQxHNcgI1ZPH5jbXk\r\nwt2qBB5JMKSmXZZTVH+1x0JDyZY1YaFL9/IfPBHmZXGrMX7C+JK3dSvba6yP\r\nkfddOzjBLUHRKUj7TEjQe3G7ZvLW5eiQOZWSLrtxojXC2h18VamUyUlxuhRS\r\nUbHQ28tWFy0p8bfx+fKUwBdh6IcKR0d7gDz8Ax3WnMou3WAqq1y8hS3fNlBe\r\nSORmWqL0+ciYO8NW7CBL/ECUE3wI6bfJj1UQkF8MqIxADbwDpBB7MFqTzfwi\r\nfChvmA2sng0iGtHJg5OgtBtHAbdYD2TzfOOprj1LAlwPDuDgt8DnbGOC04op\r\nF8px2cb1Cn2znVF4Cpby+atCOyCOrbYQfl1R1TYLuYWeUCaeSYwsgOwGpdDF\r\n1i/1QmNdGJJ0xeLC2eMuAafh0xWLbsPcV6bT/dm1LV/7zcXVdI+eiEAzPvqU\r\nCE/AEpWlGgAtR3Q92ND/T15tGjRKy4DBeVyGtut3aPAaAit/+igNjddasdr0\r\nh4Z2ypuFDtVTb9zMiHaWcLwa0s9KpBCjkYkvjCziLps7g50SyA/hvR9/Hz21\r\nqe1PGd1FZ9r9p4RE+qXqdnZr9UKtYideWsm0+IWt/CTsh+wQKSCX+t5SzCpK\r\naWsuiwYXmPOtsv361kAl99QQDrPJoQjBBOg=\r\n=l2nK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dimfeld","email":"daniel@danielimfeld.com"},"directories":{},"maintainers":[{"name":"dimfeld","email":"daniel@danielimfeld.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-json5_1.0.0_1670706029138_0.433595778141165"},"_hasShrinkwrap":false},"1.0.1":{"name":"codemirror-json5","version":"1.0.1","description":"JSON5 support for Codemirror 6","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/index.ts"},"keywords":["Codemirror","editor","code","json5"],"author":{"name":"Daniel Imfeld","email":"dimfeld"},"license":"MIT","dependencies":{"@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","json5":"^2.2.1","lezer-json5":"^2.0.1"},"devDependencies":{"@codemirror/buildhelper":"^0.1.5","@codemirror/lint":"^6.0.0","@lezer/lr":"^1.0.0","typescript":"~4.9.4"},"repository":{"type":"git","url":"git+https://github.com/dimfeld/codemirror-json5.git"},"gitHead":"0bef0f4211b53411c79141fedace638b414e71e5","bugs":{"url":"https://github.com/dimfeld/codemirror-json5/issues"},"homepage":"https://github.com/dimfeld/codemirror-json5#readme","_id":"codemirror-json5@1.0.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/ZpDik8gJbFP3fbyxYiIgWaAxYgbmvjwVi0zNUBKOSNQOzDJCKk+j8+76Gjqaa/eEIz+i+4Ts42QphetIgvNXg==","shasum":"3b9d69944acca2e3cc49eac4e100bf7dcfca0b53","tarball":"https://registry.npmjs.org/codemirror-json5/-/codemirror-json5-1.0.1.tgz","fileCount":7,"unpackedSize":26865,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbMd5GxocM+nU3ehJdyavNrg/VnYvc8ZXNTqzFzIHW0wIhAOc9kDV3AlBPT9vdYNF1tm/c9ushkZ31QRmJATOvj4MB"}]},"_npmUser":{"name":"dimfeld","email":"daniel@danielimfeld.com"},"directories":{},"maintainers":[{"name":"dimfeld","email":"daniel@danielimfeld.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-json5_1.0.1_1686422671114_0.3171164912836142"},"_hasShrinkwrap":false},"1.0.2":{"name":"codemirror-json5","version":"1.0.2","description":"JSON5 support for Codemirror 6","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/index.ts"},"keywords":["Codemirror","editor","code","json5"],"author":{"name":"Daniel Imfeld","email":"dimfeld"},"license":"MIT","dependencies":{"@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","json5":"^2.2.1","lezer-json5":"^2.0.1"},"devDependencies":{"@codemirror/buildhelper":"^0.1.5","@codemirror/lint":"^6.0.0","@lezer/lr":"^1.0.0","typescript":"~4.9.4"},"repository":{"type":"git","url":"git+https://github.com/dimfeld/codemirror-json5.git"},"gitHead":"4ad7c36bf60525dda58ddf2a9ca2f3ab1326e970","bugs":{"url":"https://github.com/dimfeld/codemirror-json5/issues"},"homepage":"https://github.com/dimfeld/codemirror-json5#readme","_id":"codemirror-json5@1.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-x3zGKMflwp6iryMeiAEhsE9F/O/zlvloXfQoelWLPhh6ytwVjqUTlqpetRB/g9k2ojAAZ2CajzPxmFk5/ErSLQ==","shasum":"9ea2237f73b69a6958a78a033d57dcb0e3f00d0c","tarball":"https://registry.npmjs.org/codemirror-json5/-/codemirror-json5-1.0.2.tgz","fileCount":7,"unpackedSize":27151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAardlPqfTOZJA7nFvMR1pXTZFU8HrbX6qpZNswysZvoAiEAu/jlgHqO8zzPZZufSYuXV+xNNZzy7+ENg/3JcDXVMik="}]},"_npmUser":{"name":"dimfeld","email":"daniel@danielimfeld.com"},"directories":{},"maintainers":[{"name":"dimfeld","email":"daniel@danielimfeld.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-json5_1.0.2_1686503348794_0.9395864678969075"},"_hasShrinkwrap":false},"1.0.3":{"name":"codemirror-json5","version":"1.0.3","description":"JSON5 support for Codemirror 6","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"scripts":{"test":"cm-runtests","prepare":"cm-buildhelper src/index.ts"},"keywords":["Codemirror","editor","code","json5"],"author":{"name":"Daniel Imfeld","email":"dimfeld"},"license":"MIT","dependencies":{"@codemirror/language":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","json5":"^2.2.1","lezer-json5":"^2.0.2"},"devDependencies":{"@codemirror/buildhelper":"^0.1.5","@codemirror/lint":"^6.0.0","@lezer/lr":"^1.0.0","typescript":"~4.9.4"},"repository":{"type":"git","url":"git+https://github.com/dimfeld/codemirror-json5.git"},"gitHead":"cad94e0b097dadbe04946e274645366b7d4c4f72","bugs":{"url":"https://github.com/dimfeld/codemirror-json5/issues"},"homepage":"https://github.com/dimfeld/codemirror-json5#readme","_id":"codemirror-json5@1.0.3","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-HmmoYO2huQxoaoG5ARKjqQc9mz7/qmNPvMbISVfIE2Gk1+4vZQg9X3G6g49MYM5IK00Ol3aijd7OKrySuOkA7Q==","shasum":"046101609776a97ae3bd0bfc4b9f15638e317793","tarball":"https://registry.npmjs.org/codemirror-json5/-/codemirror-json5-1.0.3.tgz","fileCount":7,"unpackedSize":27151,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFG7LaUuVfCjlrB218gprK4WDQLcG5s7iAhbs0SzhgiEAiEA+6wkp9RsQ4Owg7Qb3ARQzpDOQOEVT90fFzxR6ZXlHEI="}]},"_npmUser":{"name":"dimfeld","email":"daniel@danielimfeld.com"},"directories":{},"maintainers":[{"name":"dimfeld","email":"daniel@danielimfeld.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codemirror-json5_1.0.3_1687977150531_0.5497455075907851"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-10T21:00:29.138Z","1.0.0":"2022-12-10T21:00:29.346Z","modified":"2023-06-28T18:32:30.854Z","1.0.1":"2023-06-10T18:44:31.292Z","1.0.2":"2023-06-11T17:09:08.981Z","1.0.3":"2023-06-28T18:32:30.768Z"},"maintainers":[{"name":"dimfeld","email":"daniel@danielimfeld.com"}],"description":"JSON5 support for Codemirror 6","homepage":"https://github.com/dimfeld/codemirror-json5#readme","keywords":["Codemirror","editor","code","json5"],"repository":{"type":"git","url":"git+https://github.com/dimfeld/codemirror-json5.git"},"author":{"name":"Daniel Imfeld","email":"dimfeld"},"bugs":{"url":"https://github.com/dimfeld/codemirror-json5/issues"},"license":"MIT","readme":"# codemirror-json5\n\nThis package implements JSON5 support for Codemirror 6.\n\nBeyond the basic support, it provides a linter and state fields that expose:\n\n- The parsed object produced by the JSON5 parser, so that your surrounding code can use that result instead of parsing it twice.\n- The path in the object that the cursor is on.\n\n## Usage\n\n```javascript\nimport { json5, json5ParseLinter } from 'codemirror-json5';\nimport { linter } from '@codemirror/lint';\nimport { EditorState } from '@codemirror/state';\nimport { EditorView } from '@codemirror/view';\n\nconst view = new EditorView({\n  state: EditorState.create({\n    doc: `{ a_doc: 'goes here' }`,\n    extensions: [\n      json5(),\n      linter(json5ParseLinter()),\n    ]\n  })\n});\n```\n\n## Retrieving Editor State\n\n```typescript\nimport { EditorState } from '@codemirror/state';\nimport { jsonCursorPath, json5ParseCache } from 'codemirror-json5';\nimport get from 'just-safe-get';\n\nfunction getJson5Info(state: EditorState) {\n  const object = state.field(json5ParseCache);\n  const { path } = state.field(jsonCursorPath);\n\n  return {\n    parsed: object.obj,\n    parseError: object.err,\n    cursorPath: path,\n    cursorValue: get(object.obj ?? {}, path),\n  };\n}\n```\n","readmeFilename":"README.md"}