Skip to content

Commit

Permalink
Removed const (slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed May 6, 2011
1 parent 1514af0 commit c2d0774
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 47 deletions.
8 changes: 4 additions & 4 deletions lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* Module dependencies.
*/

const util = require('./util')
, toArray = util.toArray;
var util = require('./util')
, toArray = util.toArray;

/**
* Log levels.
*/

const levels = [
var levels = [
'error'
, 'warn'
, 'info'
Expand All @@ -27,7 +27,7 @@ const levels = [
* Colors for log levels.
*/

const colors = [
var colors = [
31
, 33
, 36
Expand Down
24 changes: 12 additions & 12 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
* Module dependencies.
*/

const http = require('http')
, https = require('https')
, fs = require('fs')
, qs = require('querystring')
, url = require('url')
, util = require('./util')
, store = require('./store')
, transports = require('./transports')
, Logger = require('./logger')
, Socket = require('./socket')
, MemoryStore = require('./stores/memory')
, SocketNamespace = require('./namespace');
var http = require('http')
, https = require('https')
, fs = require('fs')
, qs = require('querystring')
, url = require('url')
, util = require('./util')
, store = require('./store')
, transports = require('./transports')
, Logger = require('./logger')
, Socket = require('./socket')
, MemoryStore = require('./stores/memory')
, SocketNamespace = require('./namespace');

/**
* Export the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Module dependencies.
*/

const EventEmitter = process.EventEmitter;
var EventEmitter = process.EventEmitter;

/**
* Exports the constructor.
Expand Down
6 changes: 3 additions & 3 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Packet types.
*/

const packets = exports.packets = [
var packets = exports.packets = [
'disconnect'
, 'connect'
, 'heartbeat'
Expand All @@ -28,7 +28,7 @@ const packets = exports.packets = [
* Errors reasons.
*/

const reasons = exports.reasons = [
var reasons = exports.reasons = [
'transport not supported'
, 'client not handshaken'
, 'unauthorized'
Expand All @@ -38,7 +38,7 @@ const reasons = exports.reasons = [
* Errors advice.
*/

const advice = exports.advice = [
var advice = exports.advice = [
'reconnect'
];

Expand Down
6 changes: 3 additions & 3 deletions lib/socket.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Module dependencies.
*/

const http = require('http')
, https = require('https')
, client = require('./client/lib/io');
var http = require('http')
, https = require('https')
, client = require('./client/lib/io');

/**
* Version.
Expand Down
8 changes: 4 additions & 4 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Module dependencies.
*/

const util = require('./util')
, EventEmitter = process.EventEmitter;
var util = require('./util')
, EventEmitter = process.EventEmitter;

/**
* Export the constructor.
Expand All @@ -22,7 +22,7 @@ exports = module.exports = Socket;
* Reserved event names.
*/

const events = {
var events = {
message: 1
, connect: 1
, disconnect: 1
Expand All @@ -37,7 +37,7 @@ const events = {
* ReadyStates -> event map.
*/

const readyStates = {
var readyStates = {
0: 'disconnect'
, 1: 'connect'
, 2: 'open'
Expand Down
2 changes: 1 addition & 1 deletion lib/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module dependencies.
*/

const EventEmitter = process.EventEmitter;
var EventEmitter = process.EventEmitter;

/**
* Expose the constructor.
Expand Down
4 changes: 2 additions & 2 deletions lib/stores/memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Module dependencies.
*/

const crypto = require('crypto')
, Store = require('../store')
var crypto = require('crypto')
, Store = require('../store')

/**
* Exports the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module dependencies.
*/

const parser = require('./parser');
var parser = require('./parser');

/**
* Expose the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/htmlfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module requirements.
*/

const HTTPTransport = require('./http');
var HTTPTransport = require('./http');

/**
* Export the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/http-polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module requirements.
*/

const HTTPTransport = require('./http');
var HTTPTransport = require('./http');

/**
* Exports the constructor.
Expand Down
4 changes: 2 additions & 2 deletions lib/transports/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* Module requirements.
*/

const Transport = require('../transport')
, parser = require('../parser');
var Transport = require('../transport')
, parser = require('../parser');

/**
* Export the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/jsonp-polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module requirements.
*/

const HTTPPolling = require('./http-polling');
var HTTPPolling = require('./http-polling');

/**
* Export the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module requirements.
*/

const Transport = require('../transport');
var Transport = require('../transport');

/**
* Export the constructor.
Expand Down
2 changes: 1 addition & 1 deletion lib/transports/xhr-polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Module requirements.
*/

const HTTPPolling = require('./http-polling');
var HTTPPolling = require('./http-polling');

/**
* Export the constructor.
Expand Down
8 changes: 4 additions & 4 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
* Test dependencies.
*/

const io = require('socket.io')
, should = module.exports = require('should')
, http = require('http')
, https = require('https');
var io = require('socket.io')
, should = module.exports = require('should')
, http = require('http')
, https = require('https');

/**
* Get utility.
Expand Down
6 changes: 3 additions & 3 deletions test/parser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Test dependencies.
*/

const parser = require('socket.io').parser
, decode = parser.decode
, should = require('./common');
var parser = require('socket.io').parser
, decode = parser.decode
, should = require('./common');

/**
* Test.
Expand Down
4 changes: 2 additions & 2 deletions test/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Test dependencies.
*/

const sio = require('socket.io')
, should = require('./common');
var sio = require('socket.io')
, should = require('./common');

/**
* Test.
Expand Down

0 comments on commit c2d0774

Please sign in to comment.