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.
Passed
Push — master ( 05b86a...a462af )
by Benjamin
02:22
created

src/util/keyGenerator.js   A

Complexity

Total Complexity 7
Complexity/F 1.4

Size

Lines of Code 16
Function Count 5

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 0
wmc 7
c 1
b 1
f 0
nc 1
mnd 1
bc 2
fnc 5
dl 0
loc 16
rs 10
bpm 0.4
cpm 1.4
noi 0
1
export const keyGenerator = (...keywords) => encode(
2
    Array.from(keywords).join('')
3
);
4
5
export const keyFromObject = (obj, additionalStrings) => {
6
7
    if (additionalStrings && Array.isArray(additionalStrings)) {
8
        return encode(
9
            additionalStrings.join('') + Object.keys(obj
10
        ).map((k) => obj[k]).join(''));
11
    }
12
13
    return encode(Object.keys(obj).map((k) => obj[k]).join(''));
14
};
15
16
export const encode = s => btoa(unescape(encodeURIComponent(s)));
17