betterjsonfile

1.0.1 • Public • Published

Node.js - betterjsonfile

Note - Not affiliated with node-jsonfile
Seamlessley manage JSON files in Node.js.

Installation

npm install --save betterjsonfile

How to use

No complex API

const bjson = require('betterjsonfile')
var myVar = bjson('./file.json')

// Now, just use it as a normal JSON object. Changes will be saved automatically.

myVar.name = "Sam"

Inner objects are saved automatically as well

myVar.list = {
  friends: []
}
myVar.list.friends.push('David')

Advanced usage

You can also have betterjsonfile write in the background

// Non-synchronous
require('betterjsonfile')('./test.json',false)

Readme

Keywords

none

Package Sidebar

Install

npm i betterjsonfile

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.59 kB

Total Files

4

Last publish

Collaborators

  • samdelong