mirror of
https://github.com/samsonjs/format.git
synced 2026-03-25 08:45:53 +00:00
commit
b1a128ad7f
1 changed files with 9 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue