1.0.4 • Published 12 months ago

shush v1.0.4

Weekly downloads
203,055
License
MIT
Repository
github
Last release
12 months ago
shush

Hush up those JSON comments.

shush is a simple node module that allows JSON files containing comments to be read into a module using a require-like syntax.

/* jsonWithComments.js */
{
    // a property
    "myProp": "isCool"
}
// foo.js
var shush = require('shush'),
    config = shush('./jsonWithComments');

console.log(config); // {"myProp": "isCool"}
// foo.js es6 modules
import shush from 'shush';
const config = shush('./jsonWithComments.json');

console.log(config); // {"myProp": "isCool"}

Forthcoming feature: streaming.