Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ujjwalguptaofficial/keystore
keyStore is a library for javascript. It saves data in key and value format in html5 storage technology indexedDb.
https://github.com/ujjwalguptaofficial/keystore
alternative keystore keystores localstorage ujjwalgupta ujjwalguptaofficial
Last synced: 15 days ago
JSON representation
keyStore is a library for javascript. It saves data in key and value format in html5 storage technology indexedDb.
- Host: GitHub
- URL: https://github.com/ujjwalguptaofficial/keystore
- Owner: ujjwalguptaofficial
- License: mit
- Created: 2017-07-28T05:10:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T12:22:31.000Z (over 7 years ago)
- Last Synced: 2024-12-11T15:44:08.859Z (2 months ago)
- Topics: alternative, keystore, keystores, localstorage, ujjwalgupta, ujjwalguptaofficial
- Language: TypeScript
- Size: 659 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# Overview
keyStore is a storage library for javascript. It saves data in key and value pair in indexedDb.It acts as an alternative of localStorage.
# Feature
1. Preserves data type.
2. No size limitation.
3. Can save any type of data including object or blob storage.
4. Asynchronous api and sync data. It means when you will execute two query together query will be executed one after another.# Doc
## set - This will insert or update data.
```
Syntax: KeyStore.set(Key,value,callBack);Example -
KeyStore.set('form-data',{
Name:'Ujjwal Gupta',
Country:'India',
State:'Odisha',
City:'Bhubaneswar'
});or with callback
KeyStore.set('hello','world',function(){
});```
### Note : - callback will be executed when data has been successfully inserted.## get - This will return data in callback.
```
Syntax: KeyStore.get(Key,callBack);Example -
KeyStore.get('c',function(result){
console.log(result);
})```
## remove - This will remove data
```
Syntax: KeyStore.remove(Key,callBack);Example-
KeyStore.remove('c');
or with callback
KeyStore.remove('c',function(result){
console.log(result);
})```
## Chaining
```
KeyStore.set('hello','world').
get('hello',function(result){
console.log(result);
}).
remove('hello');```