@7inch/storage
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

@7inch/storage

npm

English | 中文

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @7inch/storage

Weekly Downloads

7

Version

0.1.4

License

MIT

Unpacked Size

15.5 kB

Total Files

12

Last publish

Collaborators

  • leewy