util: speed up common case of formatting string

PR-URL: https://github.com/nodejs/io.js/pull/1749
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
pull/1749/merge
Сковорода Никита Андреевич 2015-05-20 22:26:37 +03:00 committed by Ben Noordhuis
parent 9b35be5810
commit 214d02040e
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@ exports.format = function(f) {
return objects.join(' ');
}
if (arguments.length === 1) return f;
var i = 1;
var args = arguments;
var len = args.length;