diff --git a/lib/index.js b/lib/index.js index 8047c12..614e335 100644 --- a/lib/index.js +++ b/lib/index.js @@ -74,4 +74,13 @@ exports.format = function(format) { } return result; }; + +exports.vsprintf = function(format, replacements) { + var args = [format]; + replacements.forEach(function(replacement) { + args.push(replacement); + }); + return exports.format.apply(this, args); +}; + exports.sprintf = exports.format;