@@ -31,7 +31,7 @@ var net = require('net'),
31
31
32
32
function parse_command ( data ) {
33
33
var command ,
34
- this_string = data . toString ( 'utf8' , start = 0 , end = data . length ) ;
34
+ this_string = data . toString ( 'utf8' , 0 , data . length ) ;
35
35
command = this_string . split ( '\n' ) ;
36
36
return command [ 0 ] ;
37
37
} ;
@@ -70,9 +70,9 @@ function parse_frame(chunk) {
70
70
71
71
command = parse_command ( chunk ) ;
72
72
data = chunk . slice ( command . length + 1 , chunk . length ) ;
73
- data = data . toString ( 'utf8' , start = 0 , end = data . length ) ;
73
+ data = data . toString ( 'utf8' , 0 , data . length ) ;
74
74
75
- the_rest = data . split ( '\n\n' ) ;
75
+ var the_rest = data . split ( '\n\n' ) ;
76
76
headers = parse_headers ( the_rest [ 0 ] ) ;
77
77
body = the_rest . slice ( 1 , the_rest . length ) ;
78
78
@@ -300,7 +300,7 @@ Stomp.prototype.disconnect = function() {
300
300
* @param {Object } headers
301
301
*/
302
302
Stomp . prototype . subscribe = function ( headers ) {
303
- var self = this ;
303
+ var self = this ,
304
304
destination = headers [ 'destination' ] ;
305
305
headers [ 'session' ] = self . session ;
306
306
send_command ( this , 'SUBSCRIBE' , headers ) ;
@@ -313,7 +313,7 @@ Stomp.prototype.subscribe = function(headers) {
313
313
* @param {Object } headers
314
314
*/
315
315
Stomp . prototype . unsubscribe = function ( headers ) {
316
- var self = this ;
316
+ var self = this ,
317
317
destination = headers [ 'destination' ] ;
318
318
headers [ 'session' ] = self . session ;
319
319
send_command ( this , 'UNSUBSCRIBE' , headers ) ;
@@ -370,8 +370,8 @@ Stomp.prototype.abort = function(transaction_id) {
370
370
* @return {Object } Frame object of message sent
371
371
*/
372
372
Stomp . prototype . send = function ( headers , want_receipt ) {
373
- var self = this ;
374
- destination = headers [ 'destination' ] ;
373
+ var self = this ,
374
+ destination = headers [ 'destination' ] ,
375
375
body = headers [ 'body' ] || null ;
376
376
delete headers [ 'body' ] ;
377
377
headers [ 'session' ] = self . session ;
0 commit comments