Total Complexity | 3 |
Complexity/F | 3 |
Lines of Code | 8 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | export function t(text, arr) { |
||
2 | for (let k in arr) { |
||
3 | if (arr.hasOwnProperty(k)) { |
||
4 | text = text.split('{{' + k + '}}').join(arr[k]); |
||
5 | } |
||
6 | } |
||
7 | return text; |
||
8 | } |