caoge c760052ff9 机车状态修改 | vor 8 Monaten | |
---|---|---|
.. | ||
node_modules | vor 8 Monaten | |
index.js | vor 8 Monaten | |
license | vor 8 Monaten | |
package.json | vor 8 Monaten | |
readme.md | vor 8 Monaten |
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