shush

1.0.4 • Public • Published
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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    47,348
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    47,348
  • 1.0.3
    40,027
  • 1.0.2
    10,482
  • 1.0.1
    52,212
  • 1.0.0
    218,299
  • 0.0.1
    524

Package Sidebar

Install

npm i shush

Weekly Downloads

75,756

Version

1.0.4

License

MIT

Unpacked Size

3.74 kB

Total Files

5

Last publish

Collaborators

  • aredridel
  • totherik
  • shaunwarman
  • kumarrishav
  • shirhuang