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;