persis
v0.2.0
Published
Persistent Array / Object for node
Downloads
9
Readme
persistent
Persistent Array / Object for node
usage
npm install persis
API
- path(dir)
set the storage path
- get(key, type)
get persis Array or Object by the key.
example
var path = require('path')
var persis = require('persis')
persis.path(__dirname) // storage path
var test = persis.get('test', Array)
var test2 = persis.get('test', Object)
console.log(test)
console.log(test2)
test.push(Date.now())
test2.foo = Math.random()
run the example time and again.