mirror of
https://github.com/samsonjs/format.git
synced 2026-03-25 08:45:53 +00:00
tighten up vsprintf
This commit is contained in:
parent
b1a128ad7f
commit
4757efb70e
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue