A simple module for reading JSON files that may have comments.
JavaScript
Switch branches/tags
Clone or download
Shaun Warman
Shaun Warman 1.0.1
Latest commit 8f2de81 Sep 29, 2016
Permalink
Failed to load latest commit information.
test add absolute path test Dec 20, 2013
.gitignore in it comm it Dec 20, 2013
.npmignore dotfile Dec 20, 2013
.travis.yml Update .travis.yml: add newer node versions Dec 9, 2015
LICENSE in it comm it Dec 20, 2013
README.md clarification Dec 20, 2013
index.js Add attribution and suppress whitespace change. Sep 29, 2016
package.json 1.0.1 Sep 29, 2016

README.md

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"}

Forthcoming feature: streaming.