{"id":15986643,"url":"https://github.com/luxass/jsonc-parse","last_synced_at":"2025-03-17T23:30:41.480Z","repository":{"id":64927022,"uuid":"579419706","full_name":"luxass/jsonc-parse","owner":"luxass","description":"A lightweight JSON with Comments parser.","archived":false,"fork":false,"pushed_at":"2024-10-16T05:32:42.000Z","size":321,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T17:20:49.264Z","etag":null,"topics":["json5","json5-parser","jsonc","jsonc-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luxass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-17T16:27:57.000Z","updated_at":"2024-10-16T05:31:14.000Z","dependencies_parsed_at":"2023-01-31T00:21:47.503Z","dependency_job_id":"542874f9-efd8-42c4-8ad8-0718ed212d3c","html_url":"https://github.com/luxass/jsonc-parse","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"e90a0afa0b23632d944222fed3ea1772474a3087"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fjsonc-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fjsonc-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fjsonc-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luxass%2Fjsonc-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luxass","download_url":"https://codeload.github.com/luxass/jsonc-parse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221702959,"owners_count":16866460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json5","json5-parser","jsonc","jsonc-parser"],"created_at":"2024-10-08T03:02:27.000Z","updated_at":"2025-03-17T23:30:41.454Z","avatar_url":"https://github.com/luxass.png","language":"TypeScript","readme":"# jsonc-parse\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![jsr version][jsr-version-src]][jsr-version-href]\n\n## ✨ Features\n\n- ESM Support\n- Tree Shakeable\n- Lightweight\n\n## 📦 Installation\n\n```sh\nnpm install jsonc-parse\n```\n\n## 📚 Usage\n\n```ts\nimport { parse, parseFile, parseFileSync } from \"jsonc-parse\";\n\n// From file async\nconst jsonCFile = await parseFile(\"./config.jsonc\");\n\n// From file\nconst jsonCFile = parseFileSync(\"./config.jsonc\");\n\n// From string\nconst jsonC = parse(`{\n  \"bar\": \"foo\",\n  // This is a comment.\n  \"foo\": /* This is also a comment */ \"bar\",\n}`);\n```\n\nyou can also just import the `strip` function to remove comments from a string.\n\n```ts\n// or\nimport { strip } from \"jsonc-parse\";\n\nimport { strip } from \"jsonc-parse/strip\";\n\nconst json = strip(`{\n  \"bar\": \"foo\",\n  // This is a comment.\n  \"foo\": /* This is also a comment */ \"bar\",\n}`);\nJSON.parse(strip(json)); // { bar: \"foo\", foo: \"bar\" }\n```\n\n## 📄 License\n\nPublished under [MIT License](./LICENSE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/jsonc-parse?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-version-href]: https://npmjs.com/package/jsonc-parse\n[npm-downloads-src]: https://img.shields.io/npm/dm/jsonc-parse?style=flat\u0026colorA=18181B\u0026colorB=4169E1\n[npm-downloads-href]: https://npmjs.com/package/jsonc-parse\n[jsr-version-src]: https://jsr.io/badges/@luxass/jsonc-parse?style=flat\u0026labelColor=18181B\u0026logoColor=4169E1\n[jsr-version-href]: https://jsr.io/@luxass/jsonc-parse\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Fjsonc-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluxass%2Fjsonc-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluxass%2Fjsonc-parse/lists"}