lib: improved forEach object performance

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
This commit is contained in:
Majid Arif Siddiqui authored and Trevor Norris committed 2014-09-05 09:19:32 -07:00
1 parent 86bb7fa5cd
commit 176f0bd3df
6 files changed
+52 -30

No files matched your search

+4 -2
View File
@@ -44,9 +44,11 @@ function Console(stdout, stderr) {
Object.defineProperty(this, '_times', prop);
// bind the prototype functions to this Console instance
Object.keys(Console.prototype).forEach(function(k) {
var keys = Object.keys(Console.prototype);
for (var v = 0; v < keys.length; v++) {
var k = keys[v];
this[k] = this[k].bind(this);
}, this);
}
}
Console.prototype.log = function() {