@web-dev-media/localstorage
v1.3.4
Published
a lightweight javascript to handle localstorage.
Downloads
14
Maintainers
Readme
localstorage made simple
a lightweight javascript to handel localstorage.
Install
npm install --save @web-dev-media/localstorage
Usage
require
const localstorageJs = require("@web-dev-media/localstorage");
const cacheOptions = {
cacheTime: 24 * 60,
cacheKey: 'fooo_bar',
data: 'foo_abcd',
};
localstorageJs.set(
cacheOptions.cacheKey,
cacheOptions.data,
cacheOptions.cacheTime
);
let dataFromLocalCache = localstorageJs.get(cacheOptions.cacheKey);
localstorageJs.remove(cacheOptions.cacheKey)
contact
- [email protected]
- https://web-dev-media.de