diff --git a/lib/api.js b/lib/api.js index 9098f84..a216dce 100644 --- a/lib/api.js +++ b/lib/api.js @@ -58,13 +58,13 @@ var API = module.exports = function API(opts) { for (var p in container) { req.commandParams.push(container[p]); - }; + } return next(); }); // load route definitions - this.express.use('/', require('./api/routes')) + this.express.use('/', require('./api/routes')); }; API.prototype.defaults = { @@ -90,7 +90,7 @@ API.prototype.createServer = function createServer() { cert: fs.readFileSync(this.ssl.cert) }, this.express); } else { - Logger.warn("API using insecure connection. We recommend using an SSL certificate with Cylon.") + Logger.warn("API using insecure connection. We recommend using an SSL certificate with Cylon."); this.server = this.express; } }; diff --git a/lib/connection.js b/lib/connection.js index f652db2..ba2c9f1 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -47,7 +47,7 @@ module.exports = Connection = function Connection(opts) { this.adaptor = this.initAdaptor(opts); Utils.proxyFunctionsToObject(this.adaptor.commands, this.adaptor, this.self); -} +}; Utils.subclass(Connection, EventEmitter); @@ -69,7 +69,6 @@ Connection.prototype.toJSON = function() { // // Returns the result of the supplied callback function Connection.prototype.connect = function(callback) { - var msg = "Connecting to " + this.name; var msg = "Connecting to '" + this.name + "'"; if (this.port != null) { diff --git a/lib/cylon.js b/lib/cylon.js index b457513..024a945 100644 --- a/lib/cylon.js +++ b/lib/cylon.js @@ -99,7 +99,7 @@ if (process.platform === "win32") { readline.createInterface(io).on("SIGINT", function() { process.emit("SIGINT"); }); -}; +} process.on("SIGINT", function() { Cylon.halt(function() { diff --git a/lib/driver.js b/lib/driver.js index 8f0eee1..3095bf1 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -12,11 +12,6 @@ var Basestar = require('./basestar'), Logger = require('./logger'), Utils = require('./utils'); -// The Driver class is a base class for Driver classes in external Cylon -// modules to use. It offers basic functions for starting/halting that -// descendant classes can use. -var Driver; - // Public: Creates a new Driver // // opts - hash of acceptable params @@ -24,7 +19,7 @@ var Driver; // device - Device the driver will use to proxy commands/events // // Returns a new Driver -module.exports = Driver = function Driver(opts) { +var Driver = module.exports = function Driver(opts) { if (opts == null) { opts = {}; } diff --git a/lib/io/digital-pin.js b/lib/io/digital-pin.js index 092ec55..9363bb1 100644 --- a/lib/io/digital-pin.js +++ b/lib/io/digital-pin.js @@ -28,7 +28,7 @@ var DigitalPin = module.exports = function DigitalPin(opts) { this.status = 'low'; this.ready = false; this.mode = opts.mode; -} +}; Utils.subclass(DigitalPin, EventEmitter); diff --git a/lib/logger/null_logger.js b/lib/logger/null_logger.js index d8c6d55..af21b14 100644 --- a/lib/logger/null_logger.js +++ b/lib/logger/null_logger.js @@ -1,6 +1,6 @@ // The NullLogger is designed for cases where you want absolutely nothing to // print to anywhere. Every proxied method from the Logger returns a noop. -var NullLogger = module.exports = function NullLogger() {} +var NullLogger = module.exports = function NullLogger() {}; NullLogger.prototype.toString = function() { return "NullLogger";