mirror of https://github.com/jkjoy/sunpeiwen.git
9a9cb42f53 | ||
---|---|---|
.. | ||
History.md | ||
README.md | ||
index.js | ||
package.json |
README.md
sdk-base
A base class for sdk with default error handler.
Installation
$ npm install sdk-base
Usage
var Base = require('sdk-base');
var util = require('util');
function Client() {
Base.call(this);
}
util.inherits(Client, Base);
API
-
.ready(flagOrFunction)
// init ready client.ready(true); // listen client ready client.ready(function() { console.log('client is ready'); });
-
.on(event, listener)
// listen error event client.on('error', function(err) { console.error(err.stack); });
License
MIT