Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
939 B

  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. > Read and parse a JSON file
  3. [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).
  4. ## Install
  5. ```
  6. $ npm install --save load-json-file
  7. ```
  8. ## Usage
  9. ```js
  10. const loadJsonFile = require('load-json-file');
  11. loadJsonFile('foo.json').then(json => {
  12. console.log(json);
  13. //=> {foo: true}
  14. });
  15. ```
  16. ## API
  17. ### loadJsonFile(filepath)
  18. Returns a promise for the parsed JSON.
  19. ### loadJsonFile.sync(filepath)
  20. Returns the parsed JSON.
  21. ## Related
  22. - [write-json-file](https://github.com/sindresorhus/write-json-file) - Stringify and write JSON to a file atomically
  23. ## License
  24. MIT © [Sindre Sorhus](https://sindresorhus.com)