@7inch/storage 中文文档教程
@7inch/storage
Introduction
A basic library wrapper with localStorage and sessionStorage, base on Typescript and rollup.
Install
npm i @7inch/storage
Usage
Take localStorage for example(same as sessionStorage):
import { localStore, sessionStore } from "@7inch/storage";
// set a data item
localStore.set("foo", 10);
// get a data item
localStore.get("foo");
// remove a data item
localStore.remove("foo");
// check a data item if exists
localStore.has("foo");
// clear all items
localStore.clear();
License
Made with ❤️ Published under MIT License.
更多
你可能也喜欢
- 1000000usd 中文文档教程
- 6cjxsscyfifgqq48wwvh6r4byjv8xluc 中文文档教程
- @0x-lerna-fork/otplease 中文文档教程
- @1hive/apps-brightid-register 中文文档教程
- @36node/redux-form 中文文档教程
- @4geit/rct-assembler-component 中文文档教程
- @aaa-backend-stack/storage 中文文档教程
- @abridged/contracts 中文文档教程
- @abstract-elements/abstract-elements-base-class 中文文档教程
- @acala-network/eth-providers 中文文档教程