Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

quiet

0.0.3 • Public • Published

quiet

Loads and saves json data from/to fs

Usage

var quiet = require('quiet')
var songsDb = quiet('./songs.json')
console.log(songsDb.file) // abs path
 
songsDb.once('load', function(){
  // file loaded
  var songsData = songsDb.data
  console.log(songsData)  // parsed obj
  // ...
}).load()
 
// ...
songsData.list.push({ id: 77 })
songsDb.once('save', function(){
  // file saved
}).save()

Keywords

none

Install

npm i quiet

DownloadsWeekly Downloads

1

Version

0.0.3

License

none

Last publish

Collaborators

  • avatar