shush
Sugar for silencing JSON comments.
Last updated 4 years ago by shaunwarman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install shush 
SYNC missed versions from official npm registry.
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.

Current Tags

  • 1.0.4                                ...           latest (4 years ago)

6 Versions

  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           12 years ago
  • 0.0.1                                ...           13 years ago
Downloads
Total 28
Today 0
This Week 11
This Month 18
Last Day 7
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE