async-store

1.0.3 • Public • Published

const asyncStore = require('async-store')

async-store

Read data from a json file and return that data as a javascript object. If the file does not exist, create it with supplied data.

asyncStore({filename: 'test.json', data: {lorum: 'ipsum'}})
  .then(resp => {
    console.log(resp)
  })

asyncStore returns a promise. Both the filename and data arguments are required.

Readme

Keywords

none

Package Sidebar

Install

npm i async-store

Weekly Downloads

26

Version

1.0.3

License

ISC

Last publish

Collaborators

  • menubar