Remove legacy .once events shim

This commit is contained in:
Tim Griesser 2014-04-08 21:29:51 -04:00
parent 981b4345f0
commit 0565ed6c05

View File

@ -1,17 +1,5 @@
var url = require('url');
var defaults = require(__dirname + "/defaults");
var events = require('events');
//compatibility for old nodes
if(typeof events.EventEmitter.prototype.once !== 'function') {
events.EventEmitter.prototype.once = function (type, listener) {
var self = this;
self.on(type, function g () {
self.removeListener(type, g);
listener.apply(this, arguments);
});
};
}
// convert a JS array to a postgres array literal
// uses comma separator so won't work for types like box that use