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');
99var on = require ( './on' ) ;
1010var bind = require ( 'component-bind' ) ;
1111var debug = require ( 'debug' ) ( 'socket.io-client:socket' ) ;
12- var hasBin = require ( 'has-binary' ) ;
1312
1413/**
1514 * Module exports.
@@ -138,9 +137,7 @@ Socket.prototype.emit = function (ev) {
138137 }
139138
140139 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 } ;
144141
145142 packet . options = { } ;
146143 packet . options . compress = ! this . flags || false !== this . flags . compress ;
@@ -289,9 +286,8 @@ Socket.prototype.ack = function (id) {
289286 var args = toArray ( arguments ) ;
290287 debug ( 'sending ack %j' , args ) ;
291288
292- var type = hasBin ( args ) ? parser . BINARY_ACK : parser . ACK ;
293289 self . packet ( {
294- type : type ,
290+ type : parser . ACK ,
295291 id : id ,
296292 data : args
297293 } ) ;
Original file line number Diff line number Diff line change 2121 "component-emitter" : " 1.2.1" ,
2222 "debug" : " 2.6.4" ,
2323 "engine.io-client" : " 2.0.2" ,
24- "has-binary" : " 0.1.7" ,
2524 "has-cors" : " 1.1.0" ,
2625 "indexof" : " 0.0.1" ,
2726 "object-component" : " 0.0.3" ,
2827 "parseuri" : " 0.0.5" ,
29- "socket.io-parser" : " 2.3.2 " ,
28+ "socket.io-parser" : " ~3.1.1 " ,
3029 "to-array" : " 0.1.4"
3130 },
3231 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments