ProAct.DSL.predefined.filtering Class
src/js/dsl/dsl.js:618
A set of predefined filtering operations to be used by the DSL.
Item Index
Methods
&.
-
methodName
Flitering operation for using a method of an object as a filter.
Usage in a DSL expression:
filter(&.&boolFunc)This will call the 'target.boolFunc' method and use its result as a filter.
Parameters:
-
methodName
StringThe name of the method to use for filtering.
Returns:
The result of the method call.
+
-
n
Filtering operation for filtering only positive Numbers.
Usage in a DSL expression:
filter(+)
Parameters:
-
n
NumberThe number to check if it is positive.
Returns:
True, if the number is positive or zero.
-
-
n
Filtering operation for filtering only negative Numbers.
Usage in a DSL expression:
filter(-)
Parameters:
-
n
NumberThe number to check if it is negative.
Returns:
True, if the number is negative or zero.
all
-
val
Filtering operation for passing everything.
Usage in a DSL expression:
filter(all)
Parameters:
-
val
ObjectAnything.
Returns:
True.
defined
-
event
Filtering operation for filtering only values different from undefined.
Usage in a DSL expression:
filter(defined)
Parameters:
-
event
EventThe value event to check if its value is defined.
Returns:
True if the value in the event is not undefined
.
even
-
n
Filtering operation for filtering only even Numbers.
Usage in a DSL expression:
filter(even)
Parameters:
-
n
NumberThe number to check if it is even.
Returns:
True, if the number is even.
odd
-
n
Filtering operation for filtering only odd Numbers.
Usage in a DSL expression:
filter(odd)
Parameters:
-
n
NumberThe number to check if it is odd.
Returns:
True, if the number is odd.
originalEvent
-
event
Filtering operation for filtering only events that have null/undefined as a source.
Usage in a DSL expression:
filter(originalEvent)
Parameters:
-
event
EventThe value event to check if it has a source or not.
Returns:
True if the event
passed has no source.