1 | ;
|
2 | exports.__esModule = true;
|
3 | function substitute(str, o) {
|
4 | if (!str || !o) {
|
5 | return str;
|
6 | }
|
7 | return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) {
|
8 | if (match.charAt(0) === '\\') {
|
9 | return match.slice(1);
|
10 | }
|
11 | return (o[name] === undefined) ? '' : o[name];
|
12 | });
|
13 | }
|
14 | exports["default"] = substitute;
|
15 | //# sourceMappingURL=substitute.js.map |
\ | No newline at end of file |