Conditions | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | export default class URLString { |
||
43 | toString () { |
||
44 | 20 | const completeUrl = new URL(Object.entries(this.path).reduce(this.urlReducer, this.url)) |
|
45 | 20 | Object.entries(this.searchParams).forEach(([searchParam, searchValue]) => { |
|
46 | 9 | if (searchValue) { |
|
47 | 7 | completeUrl.searchParams.append(searchParam, searchValue) |
|
48 | } |
||
49 | }) |
||
50 | |||
51 | 20 | return completeUrl.href |
|
52 | } |
||
53 | |||
72 |
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.