Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(input, output, portNums) {
// EventEmitter
super();
// Properties
if (!input || !output || !portNums) {
throw new Error("Missing argument when creating a new device.");
}
this.input = input;
this.output = output;
this.portNums = portNums;
this.send = bindDeep(this, send);
// Call the initializers defined on the subclass (e.x. from mixins)
this.constructor.inits.forEach(init => init.call(this));
// Open connection with device
this.open();
}