wiki-js-cli/source/helpers/string.ts
Fenris Wolf b109c6777b [ini]
2024-09-30 09:11:50 +02:00

20 lines
350 B
TypeScript

namespace _wiki_js_cli.helpers.string
{
/**
*/
export function coin(
template : string,
arguments_ : Record<string, string>
) : string
{
let result : string = template;
Object.entries(arguments_).forEach(
([key, value]) => {
result = result.replace(new RegExp("{{" + key + "}}", "g"), value);
}
);
return result;
}
}