0.3.1 • Published 6 years ago

idbcache v0.3.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

idbcache

This is a module which tries to mimic lscache api, but with indexedDB storage.

Usage

1.) Install the package npm install idbcache

2.) import it in your file.

import idbcache from 'idbcache' OR,

var idbcache = require('idbcache').default

Available API's are -

1.)   set(key, val, time)

Set a value with name 'key' and value 'val' for 'time' minutes.

eg.

idbcache.set('hello', 'world', 2);

This will set the key 'hello' with value 'world' for 2mins.

2.)   get(key)

Can be used to retrieve a value store against a particular key.

eg.

// logs: "world"

Returns:

A promise.

3.)   remove(key)

Can be used to delete a particular key.

eg.

// deletes: Key titled hello from DB.

5.)   flush()

Can be used to flush the entire key-value store.

eg.

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago