cubby

0.1.0 • Public • Published

cubby

super simple synchronous json storage.

installation

$ npm install cubby

interface

cubby(FILENAME, INITIAL_VALUE, BATCH)

  • FILENAME - the name of the file it will create inside of the .cubby folder
  • INITIAL_VALUE - the initial value of the object
  • BATCH - default is false, but if you are ok with a 30-50 ms delay between the snapshot of the cubby then this would greatly improve filesystem performance if you are making hundreds of updates at the same time

usage

import cubby from 'cubby';
 
let users = cubby('users', []);
users.push('test'); // this data is automatically synced with the filesystem
 
console.log(users);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    9
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    9
  • 0.0.3
    4
  • 0.0.2
    2
  • 0.0.1
    2
  • 0.0.0
    3

Package Sidebar

Install

npm i cubby

Weekly Downloads

5

Version

0.1.0

License

MIT

Unpacked Size

2.17 kB

Total Files

3

Last publish

Collaborators

  • icodeforlove