Skip to content

node-weixin/node-weixin-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-weixin-settings NPM version Build Status Dependency Status Coverage percentage

node weixin settings

Installation

$ npm install --save node-weixin-settings

Usage

用于保存/获取只跟微信app id对应的数据

  1. 使用前一定要registerSet,registerGet,使用自定义的get,set函数
  2. 如果不使用,会导致内存不断上涨,并且无法回收
  3. 注册的采用回调方式,以便更加灵活应对不同的场景
var nodeWeixinSettings = require('node-weixin-settings');

nodeWeixinSettings.registerSet(function () {
});
nodeWeixinSettings.registerGet(function () {
});

nodeWeixinSettings.get(id, key, function (data) {
//data is the value you needed
});
nodeWeixinSettings.set(id, key, value, function () {
//end of set

});

nodeWeixinSettings.all(id, function (data) {
//data is the value you needed
});

License

Apache-2.0 © calidion

Releases

No releases published

Packages

No packages published