Passed
Pull Request — master (#4)
by
unknown
02:29 queued 12s
created

src/extractExportSpecifiers.js   A

Complexity

Total Complexity 4
Complexity/F 1.33

Size

Lines of Code 18
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 8
dl 0
loc 18
ccs 7
cts 7
cp 1
crap 0
rs 10
wmc 4
mnd 1
bc 3
fnc 3
bpm 1
cpm 1.3333
noi 1
1 1
module.exports = (declarations, resolve) => {
0 ignored issues
show
Unused Code introduced by
The parameter resolve is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
2 28
    const exps = [];
3
4 28
    declarations.forEach(node => {
5 38
        const specifiers = node.specifiers || [];
6
7 38
        specifiers.forEach(specifier => {
8 38
            exps.push({
9
                type: specifier.type === 'ExportDefaultSpecifier'
10
                    ? 'default' : 'named',
11
                name: specifier.local.name,
12
                exportedName: (specifier.exported || specifier.local).name,
13
            });
14
        });
15
    });
16
17 28
    return exps;
18
};
19