Eric Foster 35b96bc934 initial commit | 6 jaren geleden | |
---|---|---|
.. | ||
index.js | 6 jaren geleden | |
license | 6 jaren geleden | |
package.json | 6 jaren geleden | |
readme.md | 6 jaren geleden |
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