MCPcopy Index your code
hub / github.com/CacheControl/json-rules-engine / booleanOperator

Method booleanOperator

src/condition.js:122–130  ·  view source on GitHub ↗

* Returns the boolean operator for the condition * If the condition is not a boolean condition, the result will be 'undefined' * @return {string 'all', 'any', or 'not'}

(condition)

Source from the content-addressed store, hash-verified

120 * @return {string 'all', 'any', or 'not'}
121 */
122 static booleanOperator (condition) {
123 if (Object.prototype.hasOwnProperty.call(condition, 'any')) {
124 return 'any'
125 } else if (Object.prototype.hasOwnProperty.call(condition, 'all')) {
126 return 'all'
127 } else if (Object.prototype.hasOwnProperty.call(condition, 'not')) {
128 return 'not'
129 }
130 }
131
132 /**
133 * Returns the condition's boolean operator

Callers 3

constructorMethod · 0.80
toJSONMethod · 0.80
isBooleanOperatorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected