From 0565ed6c05db71865f0aa1ae4c6860636423c1c8 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Tue, 8 Apr 2014 21:29:51 -0400 Subject: [PATCH] Remove legacy .once events shim --- lib/utils.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 2c20a77d..cc238ee0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -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