From 4757efb70e50f8e45e0af4cf6c64f59e45458d1e Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 29 May 2011 01:50:21 -0700 Subject: [PATCH] tighten up vsprintf --- lib/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/index.js b/lib/index.js index 614e335..a79688d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -76,11 +76,7 @@ exports.format = function(format) { }; exports.vsprintf = function(format, replacements) { - var args = [format]; - replacements.forEach(function(replacement) { - args.push(replacement); - }); - return exports.format.apply(this, args); + return exports.format.apply(this, [format].concat(replacements)); }; exports.sprintf = exports.format;