Completed
Push — master ( 977f2a...8dbc99 )
by Daniel
56s
created

custom_functions.js ➔ MyCustomFunctions   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 16
rs 9.4285

1 Function

Rating   Name   Duplication   Size   Complexity  
B custom_functions.js ➔ ... ➔ self.decideBlackListWhiteList 0 13 5
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