1 | const props = { |
||
2 | |||
3 | checkStorage: function(key){ |
||
4 | if (localStorage.getItem(key).length == 0 ) { |
||
0 ignored issues
–
show
|
|||
5 | return false; |
||
6 | }else{ |
||
0 ignored issues
–
show
|
|||
7 | return true; |
||
8 | } |
||
9 | }, |
||
10 | |||
11 | addStorage: function(key, value){ |
||
12 | localStorage.setItem(key , value); |
||
0 ignored issues
–
show
The variable
localStorage seems to be never declared. If this is a global, consider adding a /** global: localStorage */ 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...
|
|||
13 | return true; |
||
14 | }, |
||
15 | |||
16 | getStorage: function(key){ |
||
17 | const data = localStorage.getItem(key); |
||
0 ignored issues
–
show
The variable
localStorage seems to be never declared. If this is a global, consider adding a /** global: localStorage */ 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...
|
|||
18 | return data; |
||
19 | }, |
||
20 | removeStorage: function(key){ |
||
0 ignored issues
–
show
|
|||
21 | localStorage.removeItem(); |
||
0 ignored issues
–
show
The variable
localStorage seems to be never declared. If this is a global, consider adding a /** global: localStorage */ 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...
|
|||
22 | return true; |
||
23 | }, |
||
24 | clearStorage: function(key){ |
||
0 ignored issues
–
show
|
|||
25 | localStorage.clear(); |
||
0 ignored issues
–
show
The variable
localStorage seems to be never declared. If this is a global, consider adding a /** global: localStorage */ 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...
|
|||
26 | return true; |
||
27 | } |
||
28 | |||
29 | |||
30 | |||
31 | } |
||
32 | |||
33 | export default props; |
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.