Total Complexity | 6 |
Complexity/F | 1.2 |
Lines of Code | 33 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | const props = { |
||
2 | |||
3 | checkStorage: function(key){ |
||
4 | if (localStorage.getItem(key).length == 0 ) { |
||
5 | return false; |
||
6 | }else{ |
||
7 | return true; |
||
8 | } |
||
9 | }, |
||
10 | |||
11 | addStorage: function(key, value){ |
||
12 | localStorage.setItem(key , value); |
||
13 | return true; |
||
14 | }, |
||
15 | |||
16 | getStorage: function(key){ |
||
17 | const data = localStorage.getItem(key); |
||
18 | return data; |
||
19 | }, |
||
20 | removeStorage: function(key){ |
||
21 | localStorage.removeItem(); |
||
22 | return true; |
||
23 | }, |
||
24 | clearStorage: function(key){ |
||
25 | localStorage.clear(); |
||
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.