Irina Glushko 2389e7160b HW1 done | il y a 3 ans | |
---|---|---|
.. | ||
node_modules | il y a 3 ans | |
index.js | il y a 3 ans | |
license | il y a 3 ans | |
package.json | il y a 3 ans | |
readme.md | il y a 3 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 for the parsed JSON.
Returns the parsed JSON.
MIT © Sindre Sorhus