@workablehr/idb
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -10,3 +10,12 @@ import { get as indexDBGet, set as indexDBSet, Store, clear as indexDBClear, del as indexDBDelete } from "idb-keyval"; | ||
}; | ||
/** | ||
* @description A simple cache mechanisms that is based on IndexDB. | ||
* @example | ||
* const { store, set, get, clear, del } = makeIDB("workable-store"); | ||
* | ||
* idb.get("myKey", { fetch: performFetch, maxAge: 100 }); | ||
* // if 'myKey' does not exists, it fetches and stores the result for 100 seconds | ||
*/ | ||
export default (function (name) { | ||
@@ -13,0 +22,0 @@ if (!name) { |
@@ -18,3 +18,12 @@ "use strict"; | ||
}; | ||
/** | ||
* @description A simple cache mechanisms that is based on IndexDB. | ||
* @example | ||
* const { store, set, get, clear, del } = makeIDB("workable-store"); | ||
* | ||
* idb.get("myKey", { fetch: performFetch, maxAge: 100 }); | ||
* // if 'myKey' does not exists, it fetches and stores the result for 100 seconds | ||
*/ | ||
var _default = function _default(name) { | ||
@@ -21,0 +30,0 @@ if (!name) { |
@@ -5,3 +5,3 @@ { | ||
"license": "UNLICENSED", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "lib/index.js", | ||
@@ -8,0 +8,0 @@ "module": "es/index.js", |
@@ -13,2 +13,11 @@ import { | ||
/** | ||
* @description A simple cache mechanisms that is based on IndexDB. | ||
* @example | ||
* const { store, set, get, clear, del } = makeIDB("workable-store"); | ||
* | ||
* idb.get("myKey", { fetch: performFetch, maxAge: 100 }); | ||
* // if 'myKey' does not exists, it fetches and stores the result for 100 seconds | ||
*/ | ||
export default name => { | ||
@@ -15,0 +24,0 @@ if (!name) { |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
44204
10
1150
1
49