Passed
Pull Request — main (#4)
by Pieter Epeüs
02:46
created

src/get-path.js   A

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 8
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 6
mnd 1
bc 1
fnc 1
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
bpm 1
cpm 2
noi 1
c 0
b 0
f 0
1
import isURL from './is-url.js'
2
3 2
const getPath = location =>
4 7
  isURL(location)
5
    ? new URL(location)
0 ignored issues
show
Bug introduced by
The variable URL seems to be never declared. If this is a global, consider adding a /** global: URL */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
6
    : location
7
8
export default getPath
9