Total Complexity | 6 |
Complexity/F | 3 |
Lines of Code | 18 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | |||
2 | var MyCustomFunctions = function () { |
||
3 | var self = this; |
||
4 | self.decideBlackListWhiteList = function (inDecisionValue, inEvaluatedValueForBlackList, inBlackListArray, inEvaluatedValueForWhiteList, inWhiteListArray, inValueToEvaluate) { |
||
5 | var outResultBoolean = false; |
||
6 | if (inDecisionValue === inEvaluatedValueForBlackList) { |
||
7 | if (inBlackListArray.indexOf(inValueToEvaluate) === -1) { |
||
8 | outResultBoolean = true; |
||
9 | } |
||
10 | } else if (inDecisionValue === inEvaluatedValueForWhiteList) { |
||
11 | if (inWhiteListArray.indexOf(inValueToEvaluate) > -1) { |
||
12 | outResultBoolean = true; |
||
13 | } |
||
14 | } |
||
15 | return outResultBoolean; |
||
16 | }; |
||
17 | }; |
||
18 | |||
19 | module.exports = MyCustomFunctions; |
||
20 |