tmpdb

1.0.1 • Public • Published

tmpdb

A simple database with file system.

Install

    npm install tmpdb

use

const DB = require('tmpdb');
let db = new DB({
    root:'/root/db' 
});
 
//add data
db.set('user',{
    userName :'admin',
    password:'123456'
});
 
//edit data
db.set('user',{
    __id : '123',
    userName :'admin',
    password :'1234567'
});
//delete data
db.set('user',{
    __id :'123',
    __deleted:true
});
 
 
 
/**
 * @param filter {Function} the filter Function
    -@param item {Model} the data item
    -@return {Boolean} the data item is matched
 */
db.get('user',filter);
 

Readme

Keywords

Package Sidebar

Install

npm i tmpdb

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • chaowei.luo