You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
7 months ago | |
|---|---|---|
| .. | ||
| .travis.yml | 7 months ago | |
| LICENSE | 7 months ago | |
| README.md | 7 months ago | |
| index.js | 7 months ago | |
| package.json | 7 months ago | |
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"}
// foo.js es6 modules
import shush from 'shush';
const config = shush('./jsonWithComments.json');
console.log(config); // {"myProp": "isCool"}
Forthcoming feature: streaming.