Completed
Push — master ( ac83c0...88e6de )
by Arthur
46s
created

src/components/Helpers.js   A

Complexity

Total Complexity 3
Complexity/F 3

Size

Lines of Code 8
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 3
c 1
b 0
f 0
nc 1
mnd 2
bc 3
fnc 1
dl 0
loc 8
rs 10
bpm 3
cpm 3
noi 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
}