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
Push — master ( 3acf0a...5033f3 )
by Benjamin
34s
created

buffer.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
c 2
b 0
f 0
nc 1
dl 0
loc 15
rs 9.4285
nop 5
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