sprintf-js is a complete open source JavaScript sprintf implementation for the browser and Node.js. Note: as of v1.1.1 you might need some polyfills for older environments. See Support section below. Usage var sprintf = require('sprintf-js').sprintf, vsprintf = require('sprintf-js').vsprintf sprintf('%2$s %3$s a %1$s', 'cracker', 'Polly', 'wants') vsprintf('The first 4 letters of the english alpha
![sprintf-js](https://cdn-ak-scissors.b.st-hatena.com/image/square/c3e6ffb737aa61b017c8acd52b1913aedd9e9343/height=288;version=1;width=512/https%3A%2F%2Fstatic-production.npmjs.com%2F338e4905a2684ca96e08c7780fc68412.png)