GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#61)
by Benjamin
13:47 queued 12:17
created

src/util/buffer.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 26
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
wmc 2
c 0
b 0
f 0
nc 1
mnd 0
bc 2
fnc 2
dl 0
loc 26
rs 10
bpm 1
cpm 1
noi 0
1
export const bufferTop = (
2
    rowHeight, viewableIndex, viewableCount, bufferMultiplier, totalCount
3
) => {
4
    const spacerCount = Math.max(
5
        viewableIndex - viewableCount * bufferMultiplier,
6
        0
7
    );
8
9
    // spacerCount can never be greater than (
10
    // totalCount - viewableCount * rowHeight)
11
    return Math.min(
12
        spacerCount * rowHeight,
13
        totalCount - viewableCount * rowHeight
14
    );
15
};
16
17
export const bufferBottom = (
18
    rowHeight, viewableIndex, viewableCount, bufferMultiplier, totalCount
19
) => {
20
    const spacerCount = Math.max(
21
        totalCount - viewableIndex - viewableCount * (bufferMultiplier + 1),
22
        0
23
    );
24
25
    return spacerCount * rowHeight;
26
};
27