Passed
Pull Request — master (#277)
by
unknown
02:02
created

client/legacy/src/utils/array.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 5
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 4
mnd 0
bc 0
fnc 3
dl 0
loc 5
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10
1
export const range = (from, to, step = 1, offset = 0) => (
2
  [...Array(to).keys()]
3
    .map((i) => (i + 1) * step + offset)
4
    .filter((i) => Boolean(i >= from && i <= to))
5
);
6