https://github.com/krakenjs/shush
A simple module for reading JSON files that may have comments.
https://github.com/krakenjs/shush
Last synced: about 2 months ago
JSON representation
A simple module for reading JSON files that may have comments.
- Host: GitHub
- URL: https://github.com/krakenjs/shush
- Owner: krakenjs
- License: other
- Archived: true
- Created: 2013-12-20T02:39:31.000Z (over 11 years ago)
- Default Branch: v1.x
- Last Pushed: 2025-01-31T15:55:09.000Z (5 months ago)
- Last Synced: 2025-04-16T17:18:34.497Z (2 months ago)
- Language: JavaScript
- Size: 25.4 KB
- Stars: 92
- Watchers: 11
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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.```json
/* jsonWithComments.js */
{
// a property
"myProp": "isCool"
}
```
```javascript
// foo.js
var shush = require('shush'),
config = shush('./jsonWithComments');console.log(config); // {"myProp": "isCool"}
``````javascript
// foo.js es6 modules
import shush from 'shush';
const config = shush('./jsonWithComments.json');console.log(config); // {"myProp": "isCool"}
```Forthcoming feature: streaming.