File tree 2 files changed +4
-6
lines changed 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ var packet = {
54
54
encoder .encode (packet, function (encodedPackets ) {
55
55
var decoder = new parser.Decoder ();
56
56
decoder .on (' decoded' , function (decodedPacket ) {
57
- // decodedPacket.type == parser.BINARY_EVENTEVENT
57
+ // decodedPacket.type == parser.BINARY_EVENT
58
58
// Buffer.isBuffer(decodedPacket.data.i) == true
59
59
// Buffer.isBuffer(decodedPacket.data.j) == true
60
60
// decodedPacket.id == 15
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ function Decoder() {
229
229
Emitter ( Decoder . prototype ) ;
230
230
231
231
/**
232
- * Decodes an ecoded packet string into packet JSON.
232
+ * Decodes an encoded packet string into packet JSON.
233
233
*
234
234
* @param {String } obj - encoded packet
235
235
* @return {Object } packet
@@ -250,8 +250,7 @@ Decoder.prototype.add = function(obj) {
250
250
} else { // non-binary full packet
251
251
this . emit ( 'decoded' , packet ) ;
252
252
}
253
- }
254
- else if ( isBuf ( obj ) || obj . base64 ) { // raw binary data
253
+ } else if ( isBuf ( obj ) || obj . base64 ) { // raw binary data
255
254
if ( ! this . reconstructor ) {
256
255
throw new Error ( 'got binary data when not reconstructing a packet' ) ;
257
256
} else {
@@ -261,8 +260,7 @@ Decoder.prototype.add = function(obj) {
261
260
this . emit ( 'decoded' , packet ) ;
262
261
}
263
262
}
264
- }
265
- else {
263
+ } else {
266
264
throw new Error ( 'Unknown type: ' + obj ) ;
267
265
}
268
266
} ;
You can’t perform that action at this time.
0 commit comments