|
|
пре 4 година | |
|---|---|---|
| .. | ||
| node_modules | пре 4 година | |
| History.md | пре 4 година | |
| README.md | пре 4 година | |
| index.js | пре 4 година | |
| package.json | пре 4 година | |
A base class for sdk with default error handler.
$ npm install sdk-base
var Base = require('sdk-base');
var util = require('util');
function Client() {
Base.call(this);
}
util.inherits(Client, Base);
.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);
});
MIT