php.js
Version:
Use phpjs functions as required.
12 lines (10 loc) • 404 B
JavaScript
exports.sprintf=require("./sprintf");
module.exports=function(){ return vsprintf.apply(exports,arguments) };
function vsprintf(format, args) {
// discuss at: http://phpjs.org/functions/vsprintf/
// original by: ejsanders
// depends on: sprintf
// example 1: vsprintf('%04d-%02d-%02d', [1988, 8, 1]);
// returns 1: '1988-08-01'
return this.sprintf.apply(this, [format].concat(args));
}