Add helper format function
This commit is contained in:
parent
6c64e770b4
commit
c0c0dab25a
|
@ -0,0 +1,3 @@
|
||||||
|
export default function format(template: string, ...args: string[]) {
|
||||||
|
return args.reduce((p,c) => p.replace(/{}/,c), template);
|
||||||
|
}
|
Loading…
Reference in New Issue