strip-json-comments
{
// rainbows
"unicorn": /* ❤ */ "cake"
}Install
$ npm install --save strip-json-commentsUsage
const json = '{/*rainbows*/"unicorn":"cake"}';
JSON.parse(stripJsonComments(json));
//=> {unicorn: 'cake'}API
stripJsonComments(input, [options])
input
options
Related
License
Last updated