wx-storage

Catch the exception of wechat minprogram storage API automatically

Usage no npm install needed!

<script type="module">
  import wxStorage from 'https://cdn.skypack.dev/wx-storage';
</script>

README

介绍

微信小程序storage API封装 , 方法名与原API同名 , 包含异常处理

安装

方式一. 通过 npm 安装 (推荐)

小程序已经支持使用 npm 安装第三方包,详见 npm 支持

# 通过 npm 安装
npm i wx-storage -S --production

# 通过 yarn 安装
yarn add wx-storage --production

方式二. 下载代码

直接通过 git 下载源代码,并将index.js拷贝到自己的项目中

git clone https://github.com/1sm23/wx-storage.git