Package Exports
- @itzsunny/storageapi
- @itzsunny/storageapi/dist/index.js
- @itzsunny/storageapi/dist/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@itzsunny/storageapi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Basic Storage Api
Run command for install npm i -D @itzsunny/storageapi
Example
import Storage from '@itzsunny/storageapi';
const storage = new Storage("LOCAL"); // "LOCAL" | "SESSION"
storage.set(key, value); // Set value in localstorage
storage.get(key); // Get value in localstorage
storage.clear(key)// Clear value in localstorage
storage.cleanAll(); // Clear All value in localstorage