Eric Foster d5378345de connection between front end and database | hace 6 años | |
---|---|---|
.. | ||
index.js | hace 6 años | |
license | hace 6 años | |
package.json | hace 6 años | |
readme.md | hace 6 años |
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