Skip to content

Commit

Permalink
[refactor] Remove usuless indexof dependency (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne authored Oct 8, 2017
1 parent 5d29c1c commit 6043c49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
var transports = require('./transports/index');
var Emitter = require('component-emitter');
var debug = require('debug')('engine.io-client:socket');
var index = require('indexof');
var parser = require('engine.io-parser');
var parseuri = require('parseuri');
var parseqs = require('parseqs');
Expand Down Expand Up @@ -737,7 +736,7 @@ Socket.prototype.onClose = function (reason, desc) {
Socket.prototype.filterUpgrades = function (upgrades) {
var filteredUpgrades = [];
for (var i = 0, j = upgrades.length; i < j; i++) {
if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);
if (~this.transports.indexOf(upgrades[i])) filteredUpgrades.push(upgrades[i]);
}
return filteredUpgrades;
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"debug": "~2.6.4",
"engine.io-parser": "~2.1.1",
"has-cors": "1.1.0",
"indexof": "0.0.1",
"parseqs": "0.0.5",
"parseuri": "0.0.5",
"ws": "~2.3.1",
Expand Down

0 comments on commit 6043c49

Please sign in to comment.