Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Latest commit

 

History

History
45 lines (29 loc) · 1.04 KB

README.MD

File metadata and controls

45 lines (29 loc) · 1.04 KB

storage4ns.js

Graceful storage solution with namespace.

GitHub stars GitHub license Rate on Openbase

NPM

简体中文 文档

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();