Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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');

```