1.1.2 • Published 5 years ago

promise-jsonfile v1.1.2

Weekly downloads
17
License
Anti-996
Repository
github
Last release
5 years ago

promise-jsonfile

Read and write JSON file with Promise.

Build Status 996.icu

This library is derived from node-jsonfile.

How to use

Typescript supported, check the demo.

Installation

npm install promise-jsonfile --save

Usage

import jsonfile from 'promise-jsonfile';

// read file
jsonfile
  .read('./your/file/path.json')
  .then(jsonData => {
    // do something
  })
  .catch(err => {
    throw err;
  });

// write file
jsonfile
  .write('./your/output/path.json', {
    your: 'json',
    data: 'here'
  })
  .then(() => {
    // do something
  })
  .cathc(err => {
    throw err;
  });

Licence

LICENSE

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago