Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
[admc#555] Update request dependency
Browse files Browse the repository at this point in the history
* Fixed hinting issues
  • Loading branch information
mattrayner committed Oct 23, 2018
1 parent cc30fbb commit a436e8c
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 141 deletions.
4 changes: 2 additions & 2 deletions lib/actions.js
Expand Up @@ -395,7 +395,7 @@ InputDevice.prototype.pointerButtonAction = function (type, opts) {
this.addAction(type, opts);
return this;

}
};

InputDevice.prototype.pointerCancel = function (opts) {
this.addAction("pointerCancel", _.defaults(opts, {
Expand Down Expand Up @@ -493,7 +493,7 @@ W3CActions.prototype.perform = function(cb) {
};

W3CActions.prototype.toJSON = function () {
var actions = _.values(this.inputs, function (input) { input.toJSON() });
var actions = _.values(this.inputs, function (input) { input.toJSON(); });
return {
actions: actions
};
Expand Down
13 changes: 6 additions & 7 deletions lib/commands.js
Expand Up @@ -8,7 +8,6 @@ var fs = require("fs"),
config = require('./config'),
callbacks = require("./callbacks"),
callbackWithData = callbacks.callbackWithData,
imageElementCallback = callbacks.imageElementCallback,
simpleCallback = callbacks.simpleCallback,
elementCallback = callbacks.elementCallback,
elementsCallback = callbacks.elementsCallback,
Expand Down Expand Up @@ -2518,8 +2517,8 @@ commands.pressKeycode = function() {
var data = {keycode: keycode};
if(metastate) { data.metastate = metastate; }
if(flags) {
f = 0
flags.forEach( function (value) { f = f | value; } )
var f = 0;
flags.forEach( function (value) { f = f | value; } );
data.flags = f;
}
this._jsonWireCall({
Expand Down Expand Up @@ -2547,8 +2546,8 @@ commands.longPressKeycode = function() {
var data = {keycode: keycode};
if(metastate) { data.metastate = metastate; }
if(flags) {
f = 0
flags.forEach( function (value) { f = f | value; } )
var f = 0;
flags.forEach( function (value) { f = f | value; } );
data.flags = f;
}
this._jsonWireCall({
Expand Down Expand Up @@ -3509,10 +3508,10 @@ commands.elementByImageFile = function() {
imgPath = fargs.all[0],
multiple = fargs.all[1] || false;
fs.readFile(imgPath, function(err, fileData) {
if (err) return cb(err);
if (err) { return cb(err); }
var elFn = multiple ? 'elementsByImage' : 'elementByImage';
_this[elFn](fileData.toString('base64'), cb);
});
}
};

module.exports = commands;

0 comments on commit a436e8c

Please sign in to comment.