File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ var toArray = require('to-array');
9
9
var on = require ( './on' ) ;
10
10
var bind = require ( 'component-bind' ) ;
11
11
var debug = require ( 'debug' ) ( 'socket.io-client:socket' ) ;
12
- var hasBin = require ( 'has-binary' ) ;
13
12
14
13
/**
15
14
* Module exports.
@@ -138,9 +137,7 @@ Socket.prototype.emit = function (ev) {
138
137
}
139
138
140
139
var args = toArray ( arguments ) ;
141
- var parserType = parser . EVENT ; // default
142
- if ( hasBin ( args ) ) { parserType = parser . BINARY_EVENT ; } // binary
143
- var packet = { type : parserType , data : args } ;
140
+ var packet = { type : parser . EVENT , data : args } ;
144
141
145
142
packet . options = { } ;
146
143
packet . options . compress = ! this . flags || false !== this . flags . compress ;
@@ -289,9 +286,8 @@ Socket.prototype.ack = function (id) {
289
286
var args = toArray ( arguments ) ;
290
287
debug ( 'sending ack %j' , args ) ;
291
288
292
- var type = hasBin ( args ) ? parser . BINARY_ACK : parser . ACK ;
293
289
self . packet ( {
294
- type : type ,
290
+ type : parser . ACK ,
295
291
id : id ,
296
292
data : args
297
293
} ) ;
Original file line number Diff line number Diff line change 21
21
"component-emitter" : " 1.2.1" ,
22
22
"debug" : " 2.6.4" ,
23
23
"engine.io-client" : " 2.0.2" ,
24
- "has-binary" : " 0.1.7" ,
25
24
"has-cors" : " 1.1.0" ,
26
25
"indexof" : " 0.0.1" ,
27
26
"object-component" : " 0.0.3" ,
28
27
"parseuri" : " 0.0.5" ,
29
- "socket.io-parser" : " 2.3.2 " ,
28
+ "socket.io-parser" : " ~3.1.1 " ,
30
29
"to-array" : " 0.1.4"
31
30
},
32
31
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments