Total Complexity | 8 |
Complexity/F | 1.6 |
Lines of Code | 22 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
17 | var Log = { |
||
18 | logentries : [], |
||
19 | loglevel : 0, |
||
20 | logtypes : ['debug','info','warn','exception'], |
||
21 | _currentIndex : 0, |
||
22 | |||
23 | log : function ( message, type, context ) { this.logentries.push(arguments); return (this); }, |
||
24 | get : function () { return (arguments.length > 0) ? this.logentries[parseInt(arguments[0])] : this.logentries; }, |
||
25 | clear : function () { this.logentries = []; this._currentIndex = 0; return (this); }, |
||
26 | |||
27 | setLevel : function () { if (arguments.length > 0) { this.loglevel = parseInt(arguments[0]); } else { this.loglevel = 0; } return (this); }, |
||
28 | |||
29 | _app : ( context ) => { |
||
30 | if (context) { |
||
31 | this.__app = context; |
||
32 | } else { |
||
33 | return this.__app; |
||
34 | } |
||
35 | } |
||
36 | }; |
||
37 | |||
38 | export {Log}; |
||
39 |
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.