function format(value) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        if (args.length === 0) {
            return value;
        }
        return value.replace(_formatRegexp, function (match, group) {
            var idx = parseInt(group, 10);
            return isNaN(idx) || idx < 0 || idx >= args.length ?
                match :
                args[idx];
        });
    }
Helper to produce a string with a variable number of arguments. Insert variable segments
into the string using the {n} notation where N is the index of the argument following the string.
@param value string to which formatting is applied
@param args replacements for {n}-entries