Skip to content

keyStore is a library for javascript. It saves data in key and value format in html5 storage technology indexedDb.

License

Notifications You must be signed in to change notification settings

ujjwalguptaofficial/KeyStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

keyStore is a library for javascript. It saves data in key and value format in html5 storage technology indexedDb.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published