strip-json-comments
{
// Rainbows
"unicorn": /* ❤ */ "cake"
}Install
$ npm install strip-json-commentsUsage
const json = `{
// Rainbows
"unicorn": /* ❤ */ "cake"
}`;
JSON.parse(stripJsonComments(json));
//=> {unicorn: 'cake'}API
stripJsonComments(jsonString, options?)
jsonString
options
Benchmark
Related
Last updated