Adds noop function to base adaptor.
This commit is contained in:
parent
c4b10e66f4
commit
afa7fe7495
|
@ -60,3 +60,15 @@ Adaptor.prototype.disconnect = function(callback) {
|
|||
this.removeAllListeners();
|
||||
callback();
|
||||
};
|
||||
|
||||
// Public: Voids all command functions so they do not interact
|
||||
// with anything after disconnect has been called.
|
||||
//
|
||||
// Returns nothing
|
||||
Adaptor.prototype.noop = function() {
|
||||
var fnVoid = (function(command) {
|
||||
this[command] = function() {return null };
|
||||
}).bind(this);
|
||||
|
||||
this.commands.forEach(fnVoid);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue