Function.prototype.method = function(name, func) { this.prototype[name] = func; return this; }; function filterErr(code, done) { return function(e) { done(e.code !== code ? e : void(0)); }; }; function throwErr(done) { return function(e) { if (e) { throw e; } done(); }; }; function trace(comment, func) { return function() { console.log("%s: %s", trace, arguments.toString); func(arguments); }; }; function arraySet(count, value) { var a = new Array(count); for (var i=0; i