revert slice arguments to args

- revert 4ecffe8d22
- also add benchmark
This commit is contained in:
fengmk2
2015-07-21 01:45:11 +08:00
parent 0b387e3940
commit 5e9a018b23
3 changed files with 69 additions and 3 deletions

View File

@@ -133,8 +133,11 @@ module.exports = function (app, options) {
}
// __(key, value1, value2, value3, value4, value5, ...)
var args = Array.prototype.slice.call(arguments);
var args = new Array(arguments.length);
args[0] = text;
for(var i = 1; i < args.length; i++) {
args[i] = arguments[i];
}
return util.format.apply(util, args);
};