function format(str, args) {
    var keys = Object.keys(args), i;
    for (i=0; i<keys.length; i++) {
        str = str.replace(new RegExp("\\{" + keys[i] + "\\}", "gi"), args[keys[i]]);
    }
    return str;
}
CircuitVerse - Edited
Latest npm package is 1.0.16 but we need 1.0.19