Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* Module requirements
*/

var isArray = require('isarray');
var isBuf = require('./is-buffer');

/**
Expand All @@ -28,7 +27,7 @@ exports.deconstructPacket = function(packet){
var placeholder = { _placeholder: true, num: buffers.length };
buffers.push(data);
return placeholder;
} else if (isArray(data)) {
} else if (Array.isArray(data)) {
var newData = new Array(data.length);
for (var i = 0; i < data.length; i++) {
newData[i] = _deconstructPacket(data[i]);
Expand Down Expand Up @@ -66,7 +65,7 @@ exports.reconstructPacket = function(packet, buffers) {
if (data && data._placeholder) {
var buf = buffers[data.num]; // appropriate buffer (should be natural order anyway)
return buf;
} else if (isArray(data)) {
} else if (Array.isArray(data)) {
for (var i = 0; i < data.length; i++) {
data[i] = _reconstructPacket(data[i]);
}
Expand Down Expand Up @@ -121,7 +120,7 @@ exports.removeBlobs = function(data, callback) {
};

fileReader.readAsArrayBuffer(obj); // blob -> arraybuffer
} else if (isArray(obj)) { // handle array
} else if (Array.isArray(obj)) { // handle array
for (var i = 0; i < obj.length; i++) {
_removeBlobs(obj[i], i, obj);
}
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

var debug = require('debug')('socket.io-parser');
var json = require('json3');
var isArray = require('isarray');
var Emitter = require('component-emitter');
var binary = require('./binary');
var isBuf = require('./is-buffer');
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"debug": "2.2.0",
"json3": "3.3.2",
"component-emitter": "1.1.2",
"isarray": "0.0.1",
"benchmark": "1.0.0"
},
"devDependencies": {
Expand Down