1.0.1 • Published 10 months ago
json-parse-with-comments v1.0.1
json-parse-with-comments
Parse JSON with comments
Usage:
import parse from 'json-parse-with-comments'
const source = `
  { 
    "foo": true, // Line comments
    /*
      Block comments
    */
    "bar": 42
  }
`;
const res = parse(source)
console.log(res)
// res:
{
  foo: true,
  bar: 42
}