Add helper format function

This commit is contained in:
Aelita4 2023-12-25 16:18:59 +01:00
parent 6c64e770b4
commit c0c0dab25a
Signed by: Aelita4
GPG Key ID: E44490C2025906C1
1 changed files with 3 additions and 0 deletions

3
src/lib/utils/format.ts Normal file
View File

@ -0,0 +1,3 @@
export default function format(template: string, ...args: string[]) {
return args.reduce((p,c) => p.replace(/{}/,c), template);
}