storageprovider
v1.4.1
Published
A simple API for accessing different Storages, including LocalStorage, SessionStorage and URL get parameters
Downloads
15
Maintainers
Readme
Storage Provider
Small library without any dependencies for accessing localStorage, sessionStorage and url get params over the same interface.
Getting Started
Install with npm npm i --save storageprovider
import { StorageProvider } from "storageprovider";
const storage = StorageProvider.localStorage("aPrefix");
storage.set("KEY", "a special value");
// ... some code
storage.getAsString("KEY"); // returns "a special value"
storage.getAsNumber("KEY"); // returns undefined
For details see api doc