node package manager

string-substitute

String utility which substitutes {n} tokens within the specified string

node-string-substitute

Simple string util which substitutes {n} tokens within the specified string

var substitute = require('string-substitute');
var greetings = substitute('{0}, my name is {1}!', 'Hello', 'Bruce Wayne');
console.log(greetings); //Hello, my name is Bruce Wayne! 
npm install string-substitute
mocha test