{"xo":[{"ignores":["sample.json","sample-big.json"]},{"rules":{"complexity":"off","node-test/no-conditional-assertion":"off"}}],"_id":"strip-json-comments@5.1.0","bugs":{"url":"https://github.com/sindresorhus/strip-json-comments/issues"},"dist":{"shasum":"f66b505ae80936a4654377a05a7e5d44139f7fc0","tarball":"http://registry-npm.ywwl.com/strip-json-comments/download/strip-json-comments-5.1.0.tgz","fileCount":5,"integrity":"sha512-ErcwpJBYr8EfX/Br7JauOIGXoRE92w0hVtuS9j92UFgbATxA+WRSIZksSUDzEeItfWB/0QCEprTZT55RSINUHQ==","signatures":[{"sig":"MEQCIA6aXb8DwfeUvO+n5/sCBKUCc9Uxap1f0uAWWGxRFSQYAiAymgfd5IQBlqyLB9pZWmalQFCYLZfvHTDKXWZRCuTKCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEKWNrRhdhu+qPERf5nIhVgd/ilcVp9AZKZbjLU5ecg+AiEAoUx7BYSYAcOjlDjDIKIJKtoLjK7/pVUcoVgM1f9wVic="}],"unpackedSize":8394,"size":3291,"noattachment":false,"key":"/strip-json-comments/-/strip-json-comments-5.1.0.tgz"},"name":"strip-json-comments","type":"module","types":"./index.d.ts","author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"engines":{"node":">=22"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"fb80504e71684a1e61eafc619edd8ba357c05470","license":"MIT","scripts":{"test":"xo && node --test","bench":"node benchmark.js"},"version":"5.1.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/sindresorhus/strip-json-comments#readme","keywords":["json","strip","comments","remove","delete","trim","multiline","parse","config","configuration","settings","util","env","environment","jsonc"],"repository":{"url":"git+https://github.com/sindresorhus/strip-json-comments.git","type":"git"},"_npmVersion":"12.2.0","description":"Strip comments from JSON. Lets you use comments in your JSON files!","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.12.1","_hasShrinkwrap":false,"devDependencies":{"xo":"^5.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/strip-json-comments_5.1.0_1794643849474_0.49713683926070873"},"readme":"# strip-json-comments\n\n> Strip comments from JSON. Lets you use comments in your JSON files!\n\nThis is now possible:\n\n```js\n{\n\t// Rainbows\n\t\"unicorn\": /* ❤ */ \"cake\"\n}\n```\n\nIt will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source.\n\nAlso available as a [Gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[Grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[Broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin.\n\n## Install\n\n```sh\nnpm install strip-json-comments\n```\n\n## Usage\n\n```js\nimport stripJsonComments from 'strip-json-comments';\n\nconst json = `{\n\t// Rainbows\n\t\"unicorn\": /* ❤ */ \"cake\"\n}`;\n\nJSON.parse(stripJsonComments(json));\n//=> {unicorn: 'cake'}\n```\n\n## API\n\n### stripJsonComments(jsonString, options?)\n\n#### jsonString\n\nType: `string`\n\nAccepts a string with JSON and returns a string without comments.\n\n#### options\n\nType: `object`\n\n##### trailingCommas\n\nType: `boolean`\\\nDefault: `false`\n\nStrip trailing commas in addition to comments.\n\n##### whitespace\n\nType: `boolean`\\\nDefault: `true`\n\nReplace comments and trailing commas with whitespace instead of stripping them entirely.\n\n## Benchmark\n\n```sh\nnpm run bench\n```\n\n## Related\n\n- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module\n- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS\n","publish_time":1794643849583,"_cnpm_publish_time":1794643849583,"dist-tags":{"latest":"5.1.0"}}