[Pkg-javascript-commits] [sockjs-client] 205/350: Use inherits module instead of util.inherits
tonnerre at ancient-solutions.com
tonnerre at ancient-solutions.com
Fri Aug 5 01:04:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.
commit ebd237cf92042676a613001ad28ba07920e446a2
Author: Bryce Kahle <bkahle at gmail.com>
Date: Mon Oct 20 17:48:13 2014 -0400
Use inherits module instead of util.inherits
---
lib/event/close.js | 4 ++--
lib/event/trans-message.js | 4 ++--
lib/info-ajax.js | 4 ++--
lib/info-iframe-receiver.js | 4 ++--
lib/info-iframe.js | 4 ++--
lib/info-receiver.js | 4 ++--
lib/main.js | 4 ++--
lib/transport/browser/abstract-xhr.js | 4 ++--
lib/transport/driver/xhr.js | 4 ++--
lib/transport/eventsource.js | 4 ++--
lib/transport/htmlfile.js | 4 ++--
lib/transport/iframe.js | 4 ++--
lib/transport/jsonp-polling.js | 4 ++--
lib/transport/lib/ajax-based.js | 4 ++--
lib/transport/lib/buffered-sender.js | 4 ++--
lib/transport/lib/iframe-wrap.js | 4 ++--
lib/transport/lib/polling.js | 4 ++--
lib/transport/lib/sender-receiver.js | 4 ++--
lib/transport/receiver/eventsource.js | 4 ++--
lib/transport/receiver/htmlfile.js | 4 ++--
lib/transport/receiver/jsonp.js | 4 ++--
lib/transport/receiver/xhr.js | 4 ++--
lib/transport/sender/xdr.js | 4 ++--
lib/transport/sender/xhr-cors.js | 4 ++--
lib/transport/sender/xhr-fake.js | 4 ++--
lib/transport/sender/xhr-local.js | 4 ++--
lib/transport/websocket.js | 4 ++--
lib/transport/xdr-polling.js | 4 ++--
lib/transport/xdr-streaming.js | 4 ++--
lib/transport/xhr-polling.js | 4 ++--
lib/transport/xhr-streaming.js | 4 ++--
package.json | 3 ++-
32 files changed, 64 insertions(+), 63 deletions(-)
diff --git a/lib/event/close.js b/lib/event/close.js
index 31beb6b..755a92e 100644
--- a/lib/event/close.js
+++ b/lib/event/close.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, Event = require('./event')
;
@@ -12,6 +12,6 @@ function CloseEvent() {
this.reason = '';
}
-util.inherits(CloseEvent, Event);
+inherits(CloseEvent, Event);
module.exports = CloseEvent;
diff --git a/lib/event/trans-message.js b/lib/event/trans-message.js
index 24f9eae..9f5d8f4 100644
--- a/lib/event/trans-message.js
+++ b/lib/event/trans-message.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, Event = require('./event')
;
@@ -10,6 +10,6 @@ function TransportMessageEvent(data) {
this.data = data;
}
-util.inherits(TransportMessageEvent, Event);
+inherits(TransportMessageEvent, Event);
module.exports = TransportMessageEvent;
diff --git a/lib/info-ajax.js b/lib/info-ajax.js
index e41d0c0..c97a948 100644
--- a/lib/info-ajax.js
+++ b/lib/info-ajax.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, JSON3 = require('json3')
, objectUtils = require('./utils/object')
;
@@ -33,7 +33,7 @@ function InfoAjax(url, AjaxObject) {
});
}
-util.inherits(InfoAjax, EventEmitter);
+inherits(InfoAjax, EventEmitter);
InfoAjax.prototype.close = function() {
this.removeAllListeners();
diff --git a/lib/info-iframe-receiver.js b/lib/info-iframe-receiver.js
index 4468f60..678fd75 100644
--- a/lib/info-iframe-receiver.js
+++ b/lib/info-iframe-receiver.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
, JSON3 = require('json3')
, XHRLocalObject = require('./transport/sender/xhr-local')
@@ -18,7 +18,7 @@ function InfoReceiverIframe(transUrl, baseUrl) {
});
}
-util.inherits(InfoReceiverIframe, EventEmitter);
+inherits(InfoReceiverIframe, EventEmitter);
InfoReceiverIframe.transportName = 'iframe-info-receiver';
diff --git a/lib/info-iframe.js b/lib/info-iframe.js
index b09ddcc..74d5f63 100644
--- a/lib/info-iframe.js
+++ b/lib/info-iframe.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, JSON3 = require('json3')
, utils = require('./utils/event')
, IframeTransport = require('./transport/iframe')
@@ -38,7 +38,7 @@ function InfoIframe(url) {
}
}
-util.inherits(InfoIframe, EventEmitter);
+inherits(InfoIframe, EventEmitter);
InfoIframe.enabled = function() {
return IframeTransport.enabled();
diff --git a/lib/info-receiver.js b/lib/info-receiver.js
index 73ea0fe..f8bb9f0 100644
--- a/lib/info-receiver.js
+++ b/lib/info-receiver.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, urlUtils = require('./utils/url')
, XDR = require('./transport/sender/xdr')
, XHRCors = require('./transport/sender/xhr-cors')
@@ -26,7 +26,7 @@ function InfoReceiver(baseUrl, urlInfo) {
});
}
-util.inherits(InfoReceiver, EventEmitter);
+inherits(InfoReceiver, EventEmitter);
// TODO this is currently ignoring the list of available transports and the whitelist
diff --git a/lib/main.js b/lib/main.js
index 51080b1..cd8dd27 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -3,7 +3,7 @@
require('./shims');
var u = require('url')
- , util = require('util')
+ , inherits = require('inherits')
, JSON3 = require('json3')
, random = require('./utils/random')
, escape = require('./utils/escape')
@@ -116,7 +116,7 @@ function SockJS(url, protocols, transportsWhitelist) {
this._ir.once('finish', this._receiveInfo.bind(this));
}
-util.inherits(SockJS, EventTarget);
+inherits(SockJS, EventTarget);
function userSetCode(code) {
return code === 1000 || (code >= 3000 && code <= 4999);
diff --git a/lib/transport/browser/abstract-xhr.js b/lib/transport/browser/abstract-xhr.js
index 6dc0fb6..86912db 100644
--- a/lib/transport/browser/abstract-xhr.js
+++ b/lib/transport/browser/abstract-xhr.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, utils = require('../../utils/event')
, urlUtils = require('../../utils/url')
, XHR = global.XMLHttpRequest
@@ -114,7 +114,7 @@ function AbstractXHRObject(method, url, payload, opts) {
}
}
-util.inherits(AbstractXHRObject, EventEmitter);
+inherits(AbstractXHRObject, EventEmitter);
AbstractXHRObject.prototype._cleanup = function(abort) {
debug('cleanup');
diff --git a/lib/transport/driver/xhr.js b/lib/transport/driver/xhr.js
index 3a200f7..7d716d3 100644
--- a/lib/transport/driver/xhr.js
+++ b/lib/transport/driver/xhr.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, http = require('http')
, u = require('url')
;
@@ -53,7 +53,7 @@ function XhrDriver(method, url, payload, opts) {
this.req.end();
}
-util.inherits(XhrDriver, EventEmitter);
+inherits(XhrDriver, EventEmitter);
XhrDriver.prototype.close = function() {
debug('close');
diff --git a/lib/transport/eventsource.js b/lib/transport/eventsource.js
index dd6b698..9fab98c 100644
--- a/lib/transport/eventsource.js
+++ b/lib/transport/eventsource.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, AjaxBasedTransport = require('./lib/ajax-based')
, EventSourceReceiver = require('./receiver/eventsource')
, XHRCorsObject = require('./sender/xhr-cors')
@@ -11,7 +11,7 @@ function EventSourceTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject);
}
-util.inherits(EventSourceTransport, AjaxBasedTransport);
+inherits(EventSourceTransport, AjaxBasedTransport);
EventSourceTransport.enabled = function() {
return !!EventSourceDriver;
diff --git a/lib/transport/htmlfile.js b/lib/transport/htmlfile.js
index 84f5bbc..b7f65b1 100644
--- a/lib/transport/htmlfile.js
+++ b/lib/transport/htmlfile.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, HtmlfileReceiver = require('./receiver/htmlfile')
, XHRLocalObject = require('./sender/xhr-local')
, AjaxBasedTransport = require('./lib/ajax-based')
@@ -10,7 +10,7 @@ function HtmlFileTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
}
-util.inherits(HtmlFileTransport, AjaxBasedTransport);
+inherits(HtmlFileTransport, AjaxBasedTransport);
HtmlFileTransport.enabled = function(info) {
return HtmlfileReceiver.enabled && info.sameOrigin;
diff --git a/lib/transport/iframe.js b/lib/transport/iframe.js
index 0f104a0..3373f29 100644
--- a/lib/transport/iframe.js
+++ b/lib/transport/iframe.js
@@ -8,7 +8,7 @@
// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx
// http://stevesouders.com/misc/test-postmessage.php
-var util = require('util')
+var inherits = require('inherits')
, JSON3 = require('json3')
, EventEmitter = require('events').EventEmitter
, version = require('../version')
@@ -46,7 +46,7 @@ function IframeTransport(transport, transUrl, baseUrl) {
eventUtils.attachEvent('message', this.onmessageCallback);
}
-util.inherits(IframeTransport, EventEmitter);
+inherits(IframeTransport, EventEmitter);
IframeTransport.prototype.close = function() {
debug('close');
diff --git a/lib/transport/jsonp-polling.js b/lib/transport/jsonp-polling.js
index a192d33..054438d 100644
--- a/lib/transport/jsonp-polling.js
+++ b/lib/transport/jsonp-polling.js
@@ -8,7 +8,7 @@
// o you will get a spinning cursor
// o for Konqueror a dumb timer is needed to detect errors
-var util = require('util')
+var inherits = require('inherits')
, SenderReceiver = require('./lib/sender-receiver')
, JsonpReceiver = require('./receiver/jsonp')
, jsonpSender = require('./sender/jsonp')
@@ -18,7 +18,7 @@ function JsonPTransport(transUrl) {
SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver);
}
-util.inherits(JsonPTransport, SenderReceiver);
+inherits(JsonPTransport, SenderReceiver);
JsonPTransport.enabled = function() {
return !!global.document;
diff --git a/lib/transport/lib/ajax-based.js b/lib/transport/lib/ajax-based.js
index 38c4fc0..cdd057a 100644
--- a/lib/transport/lib/ajax-based.js
+++ b/lib/transport/lib/ajax-based.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, urlUtils = require('../../utils/url')
, SenderReceiver = require('./sender-receiver')
;
@@ -37,6 +37,6 @@ function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) {
SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject);
}
-util.inherits(AjaxBasedTransport, SenderReceiver);
+inherits(AjaxBasedTransport, SenderReceiver);
module.exports = AjaxBasedTransport;
diff --git a/lib/transport/lib/buffered-sender.js b/lib/transport/lib/buffered-sender.js
index aa23272..966aafc 100644
--- a/lib/transport/lib/buffered-sender.js
+++ b/lib/transport/lib/buffered-sender.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
;
@@ -17,7 +17,7 @@ function BufferedSender(url, sender) {
this.url = url;
}
-util.inherits(BufferedSender, EventEmitter);
+inherits(BufferedSender, EventEmitter);
BufferedSender.prototype.send = function(message) {
debug('send', message);
diff --git a/lib/transport/lib/iframe-wrap.js b/lib/transport/lib/iframe-wrap.js
index f46bf50..eb0e881 100644
--- a/lib/transport/lib/iframe-wrap.js
+++ b/lib/transport/lib/iframe-wrap.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, IframeTransport = require('../iframe')
, objectUtils = require('../../utils/object')
;
@@ -11,7 +11,7 @@ module.exports = function(transport) {
IframeTransport.call(this, transport.transportName, transUrl, baseUrl);
}
- util.inherits(IframeWrapTransport, IframeTransport);
+ inherits(IframeWrapTransport, IframeTransport);
IframeWrapTransport.enabled = function(url, info) {
if (!global.document) {
diff --git a/lib/transport/lib/polling.js b/lib/transport/lib/polling.js
index dcc905e..d544f0b 100644
--- a/lib/transport/lib/polling.js
+++ b/lib/transport/lib/polling.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
;
@@ -18,7 +18,7 @@ function Polling(Receiver, receiveUrl, AjaxObject) {
this._scheduleReceiver();
}
-util.inherits(Polling, EventEmitter);
+inherits(Polling, EventEmitter);
Polling.prototype._scheduleReceiver = function() {
debug('_scheduleReceiver');
diff --git a/lib/transport/lib/sender-receiver.js b/lib/transport/lib/sender-receiver.js
index 4b54563..b81480a 100644
--- a/lib/transport/lib/sender-receiver.js
+++ b/lib/transport/lib/sender-receiver.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, urlUtils = require('../../utils/url')
, BufferedSender = require('./buffered-sender')
, Polling = require('./polling')
@@ -31,7 +31,7 @@ function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) {
});
}
-util.inherits(SenderReceiver, BufferedSender);
+inherits(SenderReceiver, BufferedSender);
SenderReceiver.prototype.close = function() {
debug('close');
diff --git a/lib/transport/receiver/eventsource.js b/lib/transport/receiver/eventsource.js
index 7bc6c3c..df32c67 100644
--- a/lib/transport/receiver/eventsource.js
+++ b/lib/transport/receiver/eventsource.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
, EventSourceDriver = require('eventsource')
;
@@ -30,7 +30,7 @@ function EventSourceReceiver(url) {
};
}
-util.inherits(EventSourceReceiver, EventEmitter);
+inherits(EventSourceReceiver, EventEmitter);
EventSourceReceiver.prototype.abort = function() {
debug('abort');
diff --git a/lib/transport/receiver/htmlfile.js b/lib/transport/receiver/htmlfile.js
index 05931f9..a65d52d 100644
--- a/lib/transport/receiver/htmlfile.js
+++ b/lib/transport/receiver/htmlfile.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, iframeUtils = require('../../utils/iframe')
, EventEmitter = require('events').EventEmitter
, random = require('../../utils/random')
@@ -47,7 +47,7 @@ function HtmlfileReceiver(url) {
});
}
-util.inherits(HtmlfileReceiver, EventEmitter);
+inherits(HtmlfileReceiver, EventEmitter);
HtmlfileReceiver.prototype.abort = function() {
debug('abort');
diff --git a/lib/transport/receiver/jsonp.js b/lib/transport/receiver/jsonp.js
index b3dad2e..99cf992 100644
--- a/lib/transport/receiver/jsonp.js
+++ b/lib/transport/receiver/jsonp.js
@@ -4,7 +4,7 @@ var utils = require('../../utils/iframe')
, random = require('../../utils/random')
, browser = require('../../utils/browser')
, urlUtils = require('../../utils/url')
- , util = require('util')
+ , inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
;
@@ -33,7 +33,7 @@ function JsonpReceiver(url) {
}, JsonpReceiver.timeout);
}
-util.inherits(JsonpReceiver, EventEmitter);
+inherits(JsonpReceiver, EventEmitter);
JsonpReceiver.prototype.abort = function() {
debug('abort');
diff --git a/lib/transport/receiver/xhr.js b/lib/transport/receiver/xhr.js
index 394d5f1..8ec7bc8 100644
--- a/lib/transport/receiver/xhr.js
+++ b/lib/transport/receiver/xhr.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
;
@@ -29,7 +29,7 @@ function XhrReceiver(url, AjaxObject) {
});
}
-util.inherits(XhrReceiver, EventEmitter);
+inherits(XhrReceiver, EventEmitter);
XhrReceiver.prototype._chunkHandler = function(status, text) {
debug('_chunkHandler', status);
diff --git a/lib/transport/sender/xdr.js b/lib/transport/sender/xdr.js
index 8bbb06e..36a3002 100644
--- a/lib/transport/sender/xdr.js
+++ b/lib/transport/sender/xdr.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
, eventUtils = require('../../utils/event')
, browser = require('../../utils/browser')
;
@@ -25,7 +25,7 @@ function XDRObject(method, url, payload) {
});
}
-util.inherits(XDRObject, EventEmitter);
+inherits(XDRObject, EventEmitter);
XDRObject.prototype._start = function(method, url, payload) {
debug('_start');
diff --git a/lib/transport/sender/xhr-cors.js b/lib/transport/sender/xhr-cors.js
index 318f822..e5feac1 100644
--- a/lib/transport/sender/xhr-cors.js
+++ b/lib/transport/sender/xhr-cors.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, XhrDriver = require('../driver/xhr')
;
@@ -11,7 +11,7 @@ function XHRCorsObject(method, url, payload, opts) {
});
}
-util.inherits(XHRCorsObject, XhrDriver);
+inherits(XHRCorsObject, XhrDriver);
XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS;
diff --git a/lib/transport/sender/xhr-fake.js b/lib/transport/sender/xhr-fake.js
index f5073ba..db2c217 100644
--- a/lib/transport/sender/xhr-fake.js
+++ b/lib/transport/sender/xhr-fake.js
@@ -1,7 +1,7 @@
'use strict';
var EventEmitter = require('events').EventEmitter
- , util = require('util')
+ , inherits = require('inherits')
;
function XHRFake(/* method, url, payload, opts */) {
@@ -13,7 +13,7 @@ function XHRFake(/* method, url, payload, opts */) {
}, XHRFake.timeout);
}
-util.inherits(XHRFake, EventEmitter);
+inherits(XHRFake, EventEmitter);
XHRFake.prototype.close = function() {
clearTimeout(this.to);
diff --git a/lib/transport/sender/xhr-local.js b/lib/transport/sender/xhr-local.js
index 8870634..100bbaf 100644
--- a/lib/transport/sender/xhr-local.js
+++ b/lib/transport/sender/xhr-local.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, XhrDriver = require('../driver/xhr')
;
@@ -13,7 +13,7 @@ function XHRLocalObject(method, url, payload /*, opts */) {
});
}
-util.inherits(XHRLocalObject, XhrDriver);
+inherits(XHRLocalObject, XhrDriver);
XHRLocalObject.enabled = XhrDriver.enabled;
diff --git a/lib/transport/websocket.js b/lib/transport/websocket.js
index f6ea2ce..e64403e 100644
--- a/lib/transport/websocket.js
+++ b/lib/transport/websocket.js
@@ -2,7 +2,7 @@
var utils = require('../utils/event')
, urlUtils = require('../utils/url')
- , util = require('util')
+ , inherits = require('inherits')
, EventEmitter = require('events').EventEmitter
, WebsocketDriver = require('./driver/websocket')
;
@@ -52,7 +52,7 @@ function WebSocketTransport(transUrl) {
};
}
-util.inherits(WebSocketTransport, EventEmitter);
+inherits(WebSocketTransport, EventEmitter);
WebSocketTransport.prototype.send = function(data) {
var msg = '[' + data + ']';
diff --git a/lib/transport/xdr-polling.js b/lib/transport/xdr-polling.js
index cfdbf54..36a1f9b 100644
--- a/lib/transport/xdr-polling.js
+++ b/lib/transport/xdr-polling.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, AjaxBasedTransport = require('./lib/ajax-based')
, XdrStreamingTransport = require('./xdr-streaming')
, XhrReceiver = require('./receiver/xhr')
@@ -11,7 +11,7 @@ function XdrPollingTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
}
-util.inherits(XdrPollingTransport, AjaxBasedTransport);
+inherits(XdrPollingTransport, AjaxBasedTransport);
XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
XdrPollingTransport.transportName = 'xdr-polling';
diff --git a/lib/transport/xdr-streaming.js b/lib/transport/xdr-streaming.js
index b6a036e..33fc7ab 100644
--- a/lib/transport/xdr-streaming.js
+++ b/lib/transport/xdr-streaming.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, AjaxBasedTransport = require('./lib/ajax-based')
, XhrReceiver = require('./receiver/xhr')
, XDRObject = require('./sender/xdr')
@@ -14,7 +14,7 @@ function XdrStreamingTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
}
-util.inherits(XdrStreamingTransport, AjaxBasedTransport);
+inherits(XdrStreamingTransport, AjaxBasedTransport);
XdrStreamingTransport.enabled = function(info) {
if (info.cookie_needed || info.nullOrigin) {
diff --git a/lib/transport/xhr-polling.js b/lib/transport/xhr-polling.js
index b1b144a..546a42f 100644
--- a/lib/transport/xhr-polling.js
+++ b/lib/transport/xhr-polling.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, AjaxBasedTransport = require('./lib/ajax-based')
, XhrReceiver = require('./receiver/xhr')
, XHRCorsObject = require('./sender/xhr-cors')
@@ -11,7 +11,7 @@ function XhrPollingTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
}
-util.inherits(XhrPollingTransport, AjaxBasedTransport);
+inherits(XhrPollingTransport, AjaxBasedTransport);
XhrPollingTransport.enabled = function(info) {
if (info.nullOrigin) {
diff --git a/lib/transport/xhr-streaming.js b/lib/transport/xhr-streaming.js
index cab4942..5e6a5d0 100644
--- a/lib/transport/xhr-streaming.js
+++ b/lib/transport/xhr-streaming.js
@@ -1,6 +1,6 @@
'use strict';
-var util = require('util')
+var inherits = require('inherits')
, AjaxBasedTransport = require('./lib/ajax-based')
, XhrReceiver = require('./receiver/xhr')
, XHRCorsObject = require('./sender/xhr-cors')
@@ -12,7 +12,7 @@ function XhrStreamingTransport(transUrl) {
AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject);
}
-util.inherits(XhrStreamingTransport, AjaxBasedTransport);
+inherits(XhrStreamingTransport, AjaxBasedTransport);
XhrStreamingTransport.enabled = function(info) {
if (info.nullOrigin) {
diff --git a/package.json b/package.json
index 1910e25..1beedc1 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"dependencies": {
"eventsource": "^0.1.3",
"faye-websocket": "~0.7.3",
+ "inherits": "^2.0.1",
"json3": "^3.3.2"
},
"devDependencies": {
@@ -63,4 +64,4 @@
"test_local": "./node_modules/.bin/zuul --local 9090 -- tests/browser.js",
"zuul": "./node_modules/.bin/zuul -- tests/browser.js"
}
-}
\ No newline at end of file
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list