1.0.1 • Published 5 years ago

betterjsonfile v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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)
1.0.1

5 years ago

1.0.0

5 years ago