shush

Sugar for silencing JSON comments.

Usage no npm install needed!

<script type="module">
  import shush from 'https://cdn.skypack.dev/shush';
</script>

README

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.