diff --git a/lib/cloudapi2.js b/lib/cloudapi2.js index 63de417..5b68405 100644 --- a/lib/cloudapi2.js +++ b/lib/cloudapi2.js @@ -203,7 +203,7 @@ CloudAPI.prototype._path = function _path(subpath /*, qparams, ... */) { */ CloudAPI.prototype._request = function _request(options, callback) { var self = this; - if (typeof options === 'string') + if (typeof (options) === 'string') options = {path: options}; assert.object(options, 'options'); assert.func(callback, 'callback'); @@ -213,8 +213,8 @@ CloudAPI.prototype._request = function _request(options, callback) { assert.ok(['get', 'post', 'delete', 'head'].indexOf(method) >= 0, 'invalid method given'); switch (method) { - case 'delete': - method = 'del'; + case 'delete': + method = 'del'; break; default: break; diff --git a/lib/config.js b/lib/config.js index 6624da1..a62794e 100755 --- a/lib/config.js +++ b/lib/config.js @@ -37,7 +37,7 @@ function loadConfigSync(opts) { c = fs.readFileSync(opts.configPath, 'utf8'); var _user = JSON.parse(c); var userConfig = JSON.parse(c); - if (typeof(userConfig) !== 'object' || Array.isArray(userConfig)) { + if (typeof (userConfig) !== 'object' || Array.isArray(userConfig)) { throw new errors.ConfigError( format('"%s" is not an object', opts.configPath)); } diff --git a/lib/do_packages.js b/lib/do_packages.js index c312a5e..9b769c0 100644 --- a/lib/do_packages.js +++ b/lib/do_packages.js @@ -56,7 +56,7 @@ function do_packages (subcmd, opts, args, callback) { * on a possible "foo-" prefix. */ pkg._groupPlus = (pkg.group || (pkg.name.indexOf('-') === -1 - ? "" : pkg.name.split('-', 1)[0])); + ? '' : pkg.name.split('-', 1)[0])); if (!opts.p) { pkg.memoryHuman = common.humanSizeFromBytes({ diff --git a/lib/do_wait_instance.js b/lib/do_wait_instance.js index d48e20b..748a9d1 100644 --- a/lib/do_wait_instance.js +++ b/lib/do_wait_instance.js @@ -57,11 +57,11 @@ function do_wait_instance(subcmd, opts, args, cb) { if (idsToWaitFor.length === 1) { var inst2 = instFromId[idsToWaitFor[0]]; console.log( - "Waiting for instance %s (%s) to enter state (states: %s)", + 'Waiting for instance %s (%s) to enter state (states: %s)', inst2.name, inst2.id, states.join(', ')); } else { console.log( - "Waiting for %d instances to enter state (states: %s)", + 'Waiting for %d instances to enter state (states: %s)', idsToWaitFor.length, states.join(', ')); } diff --git a/lib/triton.js b/lib/triton.js index 88ee33c..6cf3dee 100644 --- a/lib/triton.js +++ b/lib/triton.js @@ -142,7 +142,8 @@ Triton.prototype.listImages = function listImages(opts, cb) { if (opts.useCache) { fs.readFile(cacheFile, 'utf8', function (err, out) { if (err) { - self.log.info({err: err}, 'failed to read cache file %s', cacheFile); + self.log.info({err: err}, 'failed to read cache file %s', + cacheFile); fetch(); return; }