mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 15:29:15 +00:00
24 lines
428 B
JavaScript
24 lines
428 B
JavaScript
|
'use strict';
|
||
|
|
||
|
var EventEmitter = require('events').EventEmitter,
|
||
|
inherits = require('util').inherits;
|
||
|
|
||
|
function Command(params) {
|
||
|
params = params || {};
|
||
|
this.isEmit = params.isEmit;
|
||
|
}
|
||
|
|
||
|
exports.BaseCommand = Command;
|
||
|
|
||
|
inherits(Command, EventEmitter);
|
||
|
|
||
|
Command.prototype.enableEmitter = function() {
|
||
|
this.isEmit = true;
|
||
|
return this;
|
||
|
};
|
||
|
|
||
|
Command.prototype.disableEmitter = function() {
|
||
|
this.isEmit = false;
|
||
|
return this;
|
||
|
};
|