instapp / Storagedb
Licence: mit
MongoDB-like API for HTML5 Storage (localStorage and sessionStorage)
Stars: â 16
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
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
-
insert
(docs)
-
remove
(query)
-
update
(query, values, options)
-
find
(query, options)
-
findOne
(query, options)
-
drop
()
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
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].