Bachir Soussi Chiadmi cefd1c2ad0 updated sys and created publi | 6 tahun lalu | |
---|---|---|
.. | ||
index.js | 7 tahun lalu | |
license | 7 tahun lalu | |
package.json | 6 tahun lalu | |
readme.md | 7 tahun lalu |
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