Boolean Module
Type aliases
A function that takes one or more parameters and returns a boolean value based on the function calculation
Type parameters
-
T: unknown
The type of the value being checked
Type declaration
-
-
Parameters
-
Rest ...args: T[]
Returns boolean
-
-
Create Functions
-
Returns an Observable that emits boolean values from passed source of values
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
input: Subscribable<Iterable<T> | T> | Iterable<T> | T
Input values to create the Observable source from
Returns Observable < boolean >
Observable that emits a boolean value of the source value Boolean conversion
-
-
Returns an Observable that emits a boolean based on the input value:
- If no predicate method, the value will be converted to it's Boolean value
- If a PredicateFn is passed it's used to convert the source value to a boolean based on the function condition
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
Optional predicateFn: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns OperatorFunction < T , boolean >
Observable that emits a boolean value of a source value Boolean conversion
Filter Functions
-
Returns an Observable that emits only values from a source that does not pass the passed predicate
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits only values that don't pass the PredicateFn
-
-
Returns an Observable that emits only truthy values from a source when the value is truthy for Boolean conversion of the value - with optional PredicateFn to further filter the truthy values with a stricter check
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
Optional predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits only truthy values or values that pass the optional PredicateFn
-
-
Returns an Observable that emits the first value that does not pass the predicate
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits the first values to not pass the predicate
-
-
Returns an Observable that emits the first truthy value from a source that is truthy for Boolean conversion of the value - with optional PredicateFn to further filter the truthy values with a stricter check
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
Optional predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits the first truthy value
-
-
Returns an Observable that emits the last value that does not pass the predicate
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits the last values to not pass the predicate
-
-
Returns an Observable that emits the last truthy value from a source, the value is truthy for Boolean conversion of the value - with optional PredicateFn to further filter the truthy values with a stricter check
Type parameters
-
T: unknown
Type of the value from the source Observable
Parameters
-
Optional predicate: PredicateFn<T>
Optional PredicateFn function to compared the values against
Returns MonoTypeOperatorFunction < T >
Observable that emits the last truthy value
-
Modify Functions
-
Returns an Observable that emits a flipped boolean value from the source value
Returns MonoTypeOperatorFunction < boolean >
Observable that emits a boolean where the source Observable value have been flipped
Validation Functions
-
Returns an Observable that emits a boolean value.
The source should emit a
string
ornumber
that can be checked with the Luhn Algorithm used to validate identification numbers such as bank cards and IMEI numbers.Type parameters
-
T: string | number
string
ornumber
value to do the comparison against
Returns OperatorFunction < T , boolean >
Observable that emits an boolean if the source value passes the Luhn check
-
Generated using TypeDoc, the 18/11/2022 at 13:22:57
The RxJS Ninja Boolean module contains operators for working with, and returning boolean values, and for filtering any source with predicate methods to check for both truthy and falsy values.