Completed
Push — master ( 003c26...a1c350 )
by Donata
02:15
created

src/javascript/universal-slider.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 13
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A universal-slider.js ➔ ??? 0 11 2
1
import Slider from './blocks/slider/modules/Slider';
2
3
document.addEventListener("DOMContentLoaded", () => {
4
    let elements = document.querySelectorAll('*[data-module="slider"]');
5
6
    if(elements.length > 0) {
7
        window.sliders = [];
8
9
        [].forEach.call(elements, (element) => {
10
            window.sliders.push(new Slider(element));
11
        });
12
    }
13
});