Illia Kozyr c722a49f64 React Project DONE | il y a 2 ans | |
---|---|---|
.. | ||
index.js | il y a 2 ans | |
license | il y a 2 ans | |
package.json | il y a 2 ans | |
readme.md | il y a 2 ans |
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