1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.interpolate = interpolate;
|
4 | /**
|
5 | * @internal
|
6 | */
|
7 | // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
8 | function interpolate(msg, vars) {
|
9 | if (vars === void 0) { vars = {}; }
|
10 | // eslint-disable-next-line no-useless-escape
|
11 | return msg.replace(/\{\{([^\}]+)\}\}/g, function (_, key) { return (key in vars ? vars[key] : _); });
|
12 | }
|