Skip to content

Commit a895425

Browse files
committed
Cleaning up
1 parent 8dfbe49 commit a895425

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

frame.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ Frame.prototype.build_frame = function(args, want_receipt) {
4242
};
4343

4444
Frame.prototype.as_string = function() {
45-
var header_strs = Array();
46-
var frame = null;
47-
var command = this.command;
48-
var headers = this.headers;
49-
var body = this.body;
45+
var header_strs = Array(),
46+
frame = null,
47+
command = this.command,
48+
headers = this.headers,
49+
body = this.body;
5050

5151
for (var header in headers) {
5252
this.stomp_log.debug(header);
@@ -67,8 +67,8 @@ Frame.prototype.send_frame = function(frame) {
6767
};
6868

6969
Frame.prototype.parse_frame = function(data) {
70-
var args = [];
71-
var headers_str = null;
70+
var args = [],
71+
headers_str = null;
7272

7373
this.command = this.parse_command(data);
7474
var _data = data.slice(this.command.length + 1, data.length);
@@ -97,8 +97,8 @@ Frame.prototype.parse_frame = function(data) {
9797
Frame.prototype.parse_headers = function(headers_str) {
9898

9999
var these_headers = Array(),
100-
one_header = Array();
101-
var headers_split = headers_str.split('\n');
100+
one_header = Array(),
101+
headers_split = headers_str.split('\n');
102102

103103
for (var i = 0; i < headers_split.length; i++) {
104104
one_header = headers_split[i].split(':');
@@ -120,8 +120,8 @@ Frame.prototype.parse_headers = function(headers_str) {
120120

121121
Frame.prototype.parse_command = function(data) {
122122

123-
var command;
124-
var this_string = data.toString('ascii', start=0, end=data.length);
123+
var command,
124+
this_string = data.toString('ascii', start=0, end=data.length);
125125
command = this_string.split('\n');
126126
return command[0];
127127

stomp-exceptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BrokerErrorResponse = module.exports = function(value) {
1+
BrokerErrorResponse = exports.BrokerErrorResponse = function(value) {
22
this.value = value;
33
this.message = "Broker returned error: " + this.value
44
console.error(this.message + this.value);

stomp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Stomp = module.exports = function(port, host, debug) {
1515
Stomp.prototype.connect = function() {
1616

1717
this.stomp_log.debug('Connecting to ' + this.host + ':' + this.port);
18-
client = net.createConnection(this.port, this.host);
18+
var client = net.createConnection(this.port, this.host);
1919
var _stomp = this;
2020

2121
client.addListener('connect', function () {

0 commit comments

Comments
 (0)