storage4ns
v1.0.0
Published
Graceful storage solution with namespace.
Downloads
2
Readme
storage4ns.js
Graceful storage solution with namespace.
Installation
npm install storage4ns --save
or
yarn add storage4ns
DEMO
import NStorage from "storage4ns";
const nstorage = new NStorage("sys-admin");
// Put storage item
nstorage.put("access-token", "token-secret");
// Get storage item
let userName = nstorage.get("user-name");
console.log(userName);
// Remove storage item
nstorage.remove("user-name");
// Clears storage
nstorage.clear();