Skip to content

Commit

Permalink
[revert] [refactor] Remove usuless indexof dependency (#582)
Browse files Browse the repository at this point in the history
This reverts commit 6043c49.
  • Loading branch information
darrachequesne committed Oct 11, 2017
1 parent 8ce2432 commit 42501c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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 @@ -736,7 +737,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 (~this.transports.indexOf(upgrades[i])) filteredUpgrades.push(upgrades[i]);
if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]);
}
return filteredUpgrades;
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"debug": "~2.6.9",
"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 42501c6

Please sign in to comment.