mirror of
https://github.com/samsonjs/format.git
synced 2026-04-27 14:57:39 +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) {
|
exports.vsprintf = function(format, replacements) {
|
||||||
var args = [format];
|
return exports.format.apply(this, [format].concat(replacements));
|
||||||
replacements.forEach(function(replacement) {
|
|
||||||
args.push(replacement);
|
|
||||||
});
|
|
||||||
return exports.format.apply(this, args);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.sprintf = exports.format;
|
exports.sprintf = exports.format;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue