Bachir Soussi Chiadmi ac58a24f5c added bower, gulp | 7 years ago | |
---|---|---|
.. | ||
node_modules | 7 years ago | |
index.js | 7 years ago | |
license | 7 years ago | |
package.json | 7 years ago | |
readme.md | 7 years ago |
Read and parse a JSON file
Strips UTF-8 BOM, uses graceful-fs
, and throws more helpful JSON errors.
$ npm install --save load-json-file
const loadJsonFile = require('load-json-file');
loadJsonFile('foo.json').then(json => {
console.log(json);
//=> {foo: true}
});
Returns a promise that resolves to the parsed JSON.
Returns the parsed JSON.
MIT © Sindre Sorhus