@axetroy/wxapp-storage

0.1.1 • Public • Published

wxapp-storage

Build Status Dependency License Prettier Node npm version

Git Package Manager, make you manage the repository easier

Installation

npm install @axetroy/wxapp-storage

Features

  • [x] 存储绝大多数的数据类型(微信原生对象只支持object/string)
  • [x] 设置有存储时限
  • [x] 优雅的API

Usage

// usage
import Storage from '@axetroy/wxapp-storage';
const store = new Storage(wx);

store.set('userinfo',{
  username: 'axetroy',
  age: 'Forever Young'
});

console.log(store.get('userinfo'));

API

store.set(key:string, value:any, expiration:number):this

存储

store.get(key:string):any

store.remove(key:string):this

store.clear():this

Contributing

git clone https://github.com/axetroy/wxapp-storage.git
cd ./wxapp-storage
yarn

You can flow Contribute Guide

Contributors


Axetroy

💻 🔌 ⚠️ 🐛 🎨

License

The MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i @axetroy/wxapp-storage

Weekly Downloads

2

Version

0.1.1

License

ISC

Last publish

Collaborators

  • axetroy