greater
greaterOrEqual
less
lessOrEqual
equal
notEqual
identical
notIdentical
isNull
isUndefined
isNil
isNumber
isString
isFunction
isArray
isObject
isDefined
You can check the module import here
.
Returns true if the first value is greater than the second value.
import { NgIsGreaterPipeModule } from 'angular-pipes';
{{ 0 | greater: 1 }}
<!-- false -->
{{ 1 | greater: 0 }}
<!-- true -->
{{ 1 | greater: 1 }}
<!-- false -->
Returns true if the first value is greater or equal to the second value.
import { NgIsGreaterOrEqualPipeModule } from 'angular-pipes';
{{ 0 | greaterOrEqual: 1 }}
<!-- false -->
{{ 1 | greaterOrEqual: 0 }}
<!-- true -->
{{ 1 | greaterOrEqual: 1 }}
<!-- true -->
Returns true if the first value is less than the second value.
import { NgIsLessPipeModule } from 'angular-pipes';
{{ 0 | less: 1 }}
<!-- true -->
{{ 1 | less: 0 }}
<!-- false -->
{{ 1 | less: 1 }}
<!-- false -->
Returns true if the first value is less or equal to the second value.
import { NgIsLessOrEqualPipeModule } from 'angular-pipes';
{{ 0 | lessOrEqual: 1 }}
<!-- true -->
{{ 1 | lessOrEqual: 0 }}
<!-- false -->
{{ 1 | lessOrEqual: 1 }}
<!-- true -->
Returns true if the value are equal (operator ==
).
import { NgIsEqualPipeModule } from 'angular-pipes';
{{ 0 | equal: 1 }}
<!-- false -->
{{ 1 | equal: '1' }}
<!-- true -->
{{ 1 | equal: 1 }}
<!-- true -->
Returns true if the value are not equal (operator !=
).
import { NgIsNotEqualPipeModule } from 'angular-pipes';
{{ 0 | notEqual: 1 }}
<!-- true -->
{{ 1 | notEqual: '1' }}
<!-- false -->
{{ 1 | notEqual: 1 }}
<!-- false -->
Returns true if the value are identical (operator ===
).
import { NgIsIdenticalPipeModule } from 'angular-pipes';
{{ 0 | identical: 1 }}
<!-- false -->
{{ 1 | identical: '1' }}
<!-- false -->
{{ 1 | identical: 1 }}
<!-- true -->
Returns true if the value are not identical (operator !==
).
import { NgIsNotIdenticalPipeModule } from 'angular-pipes';
{{ 0 | notIdentical: 1 }}
<!-- true -->
{{ 1 | notIdentical: '1' }}
<!-- true -->
{{ 1 | notIdentical: 1 }}
<!-- false -->
Returns true if the value if null.
import { NgIsNullPipeModule } from 'angular-pipes';
{{ null | isNull }}
<!-- true -->
{{ 1 | isNull }}
<!-- false -->
Returns true if the value if undefined.
import { NgIsUndefinedPipeModule } from 'angular-pipes';
{{ a | isUndefined }}
<!-- true if a does not exists -->
{{ 1 | isUndefined }}
<!-- false -->
Returns true if the value if null or undefined.
import { NgIsNilPipeModule } from 'angular-pipes';
{{ a | isNil }}
<!-- true if a does not exists -->
{{ null | isNil }}
<!-- true -->
{{ 1 | isNil }}
<!-- false -->
Returns true if the value is a number.
import { NgIsNumberPipeModule } from 'angular-pipes';
{{ 'a' | isNumber }}
<!-- false -->
{{ 1 | isNumber }}
<!-- true -->
Returns true if the value is a string.
import { NgIsStringPipeModule } from 'angular-pipes';
{{ 'a' | isString }}
<!-- true -->
{{ 1 | isString }}
<!-- false -->
Returns true if the value is a function.
import { NgIsFunctionPipeModule } from 'angular-pipes';
myFn() {
// ...
}
{{ 'a' | isFunction }}
<!-- false -->
{{ myFn | isFunction }}
<!-- true -->
Returns true if the value is an array.
import { NgIsArrayPipeModule } from 'angular-pipes';
{{ 'a' | isArray }}
<!-- false -->
{{ [] | isArray }}
<!-- true -->
Returns true if the value is an object.
import { NgIsObjectPipeModule } from 'angular-pipes';
{{ 'a' | isObject }}
<!-- false -->
{{ {} | isObject }}
<!-- true -->
Returns true if the value is defined (nor null nor undefined).
import { NgIsDefinedPipeModule } from 'angular-pipes';
{{ 'a' | isDefined }}
<!-- true -->
{{ null | isDefined }}
<!-- false -->
{{ a | isDefined }}
<!-- false if a does not exists -->