Completed
Push — master ( e9cdde...e60414 )
by Ajeh
33s
created

test/unit/utilities/helpers.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 6
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
wmc 3
c 2
b 0
f 0
nc 1
mnd 1
bc 2
fnc 2
dl 0
loc 6
rs 10
bpm 1
cpm 1.5
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A helpers.js ➔ nodeLength 0 3 1
1
/**
2
 * Created by Emmy on 10/11/2017.
3
 */
4
5
export function getElem(selector, all = false) {
6
    return all ? document.querySelectorAll(selector) : document.querySelector(selector)
7
}
8
export function nodeLength(selector) {
9
    return getElem(selector, true).length
10
}
11