All Projects â†’ instapp â†’ Storagedb

instapp / Storagedb

Licence: mit
MongoDB-like API for HTML5 Storage (localStorage and sessionStorage)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Storagedb

Immortaldb
đŸ”© A relentless key-value store for the browser.
Stars: ✭ 2,962 (+18412.5%)
Mutual labels:  library, localstorage, sessionstorage
stoor
Storage wrapper with support for namespacing, timeouts and multi get/set and remove.
Stars: ✭ 26 (+62.5%)
Mutual labels:  localstorage, sessionstorage
elm-storage
Unified interface for accessing and modifying LocalStorage, SessionStorage and Cookies
Stars: ✭ 13 (-18.75%)
Mutual labels:  localstorage, sessionstorage
persistence
đŸ’Ÿ Persistence provides a pretty easy API to handle Storage's implementations.
Stars: ✭ 18 (+12.5%)
Mutual labels:  localstorage, sessionstorage
ngx-localstorage
An Angular wrapper for localstorage/sessionstorage access.
Stars: ✭ 27 (+68.75%)
Mutual labels:  localstorage, sessionstorage
ng2-storage
A local and session storage wrapper for angular 2.
Stars: ✭ 14 (-12.5%)
Mutual labels:  localstorage, sessionstorage
localstorage-manager
LocalStorage Manager is a Chrome extension to add, edit, remove, export and import local storage and session storage data
Stars: ✭ 37 (+131.25%)
Mutual labels:  localstorage, sessionstorage
cache-bucket
Light Cache for nodeJs and browserJs with TTL.
Stars: ✭ 14 (-12.5%)
Mutual labels:  localstorage, sessionstorage
Angular Locker
đŸ—„ïž A simple & configurable abstraction for local/session storage in angular js projects
Stars: ✭ 318 (+1887.5%)
Mutual labels:  localstorage, sessionstorage
svelte-persistent-store
A Svelte store that keep its value through pages and reloads
Stars: ✭ 111 (+593.75%)
Mutual labels:  localstorage, sessionstorage
browserStorage
æ”è§ˆć™šæœŹćœ°ć­˜ć‚šć°èŁ…
Stars: ✭ 30 (+87.5%)
Mutual labels:  localstorage, sessionstorage
Vue Ls
đŸ’„ Vue plugin for work with local storage, session storage and memory storage from Vue context
Stars: ✭ 468 (+2825%)
Mutual labels:  localstorage, sessionstorage
local-storage-fallback
Check and use appropriate storage adapter for browser (localStorage, sessionStorage, cookies, memory)
Stars: ✭ 103 (+543.75%)
Mutual labels:  localstorage, sessionstorage
h5webstorage
Web Storage for Angular 2
Stars: ✭ 38 (+137.5%)
Mutual labels:  localstorage, sessionstorage
vue-storage-watcher
a reactive storage plugin for vue 👀🔭
Stars: ✭ 60 (+275%)
Mutual labels:  localstorage, sessionstorage
client-persist
Offline storage for your web client. Supports IndexedDB, WebSQL, localStorage and sessionStorage with an easy to crawl with API.
Stars: ✭ 14 (-12.5%)
Mutual labels:  localstorage, sessionstorage
Jest Localstorage Mock
A module to mock window.localStorage and window.sessionStorage in Jest
Stars: ✭ 247 (+1443.75%)
Mutual labels:  localstorage, sessionstorage
mst-persist
Persist and hydrate MobX-state-tree stores (in < 100 LoC)
Stars: ✭ 75 (+368.75%)
Mutual labels:  localstorage, sessionstorage
vue-web-storage
Vue.js plugin for local storage and session storage (1.8 kb min+gz) đŸ’Ÿ
Stars: ✭ 85 (+431.25%)
Mutual labels:  localstorage, sessionstorage
Ng2 Webstorage
Localstorage and sessionstorage manager - Angular service
Stars: ✭ 395 (+2368.75%)
Mutual labels:  localstorage, sessionstorage

StorageDB

npm license

MongoDB-like API for HTML5 Storage (localStorage and sessionStorage)

NOTICE: The npm package name is 'storagedb2'

Features

  • MongoDB-like API
  • Lightweight, only 3KB (minified and gzipped)
  • No dependencies
  • Easy configuration
  • Well-supported query selectors ($gt,$in, ...) and options (skip, limit, sort)
  • Automatically cache in memory

Getting started

Install

npm install --save storagedb2

Import storagedb to your project (ES6)

import StorageDB from 'storagedb2'

Or add the script to your main HTML file

<script src="./lib/storagedb.js"></script>

Collection Supported methods

Usage

Instantiate

const db = new StorageDB({
    storage: window.localStorage,     // storage object, default is window.localStorage. If you want to store data in memory only, you can set it null
    database: 'testdb',               // database name, default is 'db'
    primaryKey: 'id'                  // primary key of collection, default is '_id'
})

// create collection (table) instance
const Users = db.get('users')

insert

Users.insert({
    id: 100,
    name: 'Elon',
    age: 12
})

Users.insert([{
    id: 101,
    name: 'Larry',
    age: 21
}, {
    id: 102,
    name: 'Sergey',
    age: 21
}])

find

Users.find([100, 102])

Users.find({
    name: /y$/,
    age: {
        $gte: 20
    }
}, {
    skip: 0,
    limit: 20,
    sort: {
        age: 1
    }
})

find

Users.findOne(102)

Users.findOne({
    age: {
        $ne: 21
    }
})

update

Users.update(100, {
    age: 47,
    company: 'The Avengers'
})

Users.update({
    age: 21
}, {
    age: 22
}, {
    multi: true
})

remove

Users.remove(101)

Users.remove({
    age: 21
})

drop

Users.drop()

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].