src/string-helper.js   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 8
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
mnd 0
bc 0
fnc 3
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
1 2
export const capitalizeFirstLetter = (string) =>
2 39
    string.charAt(0).toUpperCase() + string.slice(1);
3
4 2
export const capitalizeWords = (string) =>
5 26
    string
6
        .split(/_| /)
7 39
        .map((word) => capitalizeFirstLetter(word))
8
        .join('');
9