CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
readme.md46 linesDownload Raw Back to load-json-file
1# load-json-file [![Build Status](https://travis-ci.org/sindresorhus/load-json-file.svg?branch=master)](https://travis-ci.org/sindresorhus/load-json-file)2 3> Read and parse a JSON file4 5[Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom), uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs), and throws more [helpful JSON errors](https://github.com/sindresorhus/parse-json).6 7 8## Install9 10```11$ npm install --save load-json-file12```13 14 15## Usage16 17```js18const loadJsonFile = require('load-json-file');19 20loadJsonFile('foo.json').then(json => {21	console.log(json);22	//=> {foo: true}23});24```25 26 27## API28 29### loadJsonFile(filepath)30 31Returns a promise for the parsed JSON.32 33### loadJsonFile.sync(filepath)34 35Returns the parsed JSON.36 37 38## Related39 40- [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically41 42 43## License44 45MIT © [Sindre Sorhus](https://sindresorhus.com)46 
basant307/AI_Governance_Project · CoolFace