1.0.0 • Published 1 year ago
json-parse-with-comments v1.0.0
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
}
License
1.0.0
1 year ago