https://github.com/klouskingsley/fakemp
使用浏览器来模拟小程序Api
https://github.com/klouskingsley/fakemp
fake mp wechat weixin wx
Last synced: 19 days ago
JSON representation
使用浏览器来模拟小程序Api
- Host: GitHub
- URL: https://github.com/klouskingsley/fakemp
- Owner: klouskingsley
- Created: 2018-06-10T10:32:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T14:35:21.000Z (about 8 years ago)
- Last Synced: 2026-07-21T15:38:45.169Z (19 days ago)
- Topics: fake, mp, wechat, weixin, wx
- Language: JavaScript
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# fakemp 
> 使用浏览器模拟微信小程序Api, 现仅支持[Storage](https://developers.weixin.qq.com/miniprogram/dev/api/data.html)
## Install
```npm
$ npm install fakemp -S
```
## Usage
> 用法与微信小程序一致
```js
const wx = require('fakemp')
wx.setStorageSync('foo', 'bar')
wx.getStorageSync('foo') // bar
```
## Api
#### .createInstance(*[options]*)
创建新的wx实例(多个小程序数据隔离时需要)
###### options
- Type: `object`
name | description | default
--- | --- | ---
appId | 小程序的appId, 用于隔离不同的storage | Math.random()
## License
MIT