You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ninjadb is a wrapper for lowdb to make it easier. For use in tiny projects.
install
npm install ninjadb
usage
constninjadb=require('ninjadb')constusers=ninjadb.create('users.json')users.push({name: 'ninja',pass: 'example'})users.remove({name: 'ninja'})users.update({name: 'ninja'},{name: 'hello'})users.upsert({name: 'ninja'},{name: 'ninja',pass: 'example'})users.find({name: 'ninja'})// one ninjausers.filter({name: 'ninja'})// all ninjas//option: enable idsconstusers=ninjadb.create('users',{useId: true})//optional: store your data in another locationconstusers=ninjadb.create('../data/users.json')