alexei/sprintf.js

vsprintf modifies its arguments array.

bashi-bazouk opened this issue · 0 comments

Try in the browser:

const formatString = "%1$d/%2$d/%3$d";
const argumentsArray = [2017,7,14];
console.log(vsprintf(formatString, argumentsArray))
console.log("Arguments array is now", argumentsArray)

The format string is prepended to the arguments array.