Passed
Pull Request — master (#158)
by
unknown
02:44 queued 57s
created

src/frames/util.ts   A

Complexity

Total Complexity 4
Complexity/F 2

Size

Lines of Code 9
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 5
mnd 2
bc 2
fnc 2
dl 0
loc 9
rs 10
bpm 1
cpm 2
noi 0
c 0
b 0
f 0
1
2
export function validateLanguage(language: string) {
3
    if (language.length !== 3) {
4
        throw new TypeError(
5
            "Language string length must be 3, see ISO 639-2 codes"
6
        )
7
    }
8
    return language
9
}
10