boxyjs

Simple datastore for the browser


Keywords
store, data, datastore
License
MIT
Install
npm install boxyjs@1.0.0

Documentation

boxyjs

Simple datastore

functions

create(storeName)

creates new datastore

destroy(storeName)

removes datastore

instert(storeName, object)

inserts object into datastore

set(storeName, key, value)

sets new value to a key in datastore

get(storeName, key)

gets value of a key from datastore

empty(storeName, key)

sets the value of a key to null.

remove(storeName, key)

removes key from datastore

list(storeName)

lists all key: value pairs in datastore

find(storeName, query)

finds a value in datastore. query can be string or object, returns array of key: value pairs

{ 'gt': 'value' }

possible operators are gt, lt, gte, lte, eq

findOne(storeName, query)

returns first key: value pair found based on query