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 { IsGreaterPipe } 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 { IsGreaterOrEqualPipe } 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 { IsLessPipe } 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 { IsLessOrEqualPipe } from 'angular-pipes';
{{ 0 | lessOrEqual: 1 }} <!-- true -->
{{ 1 | lessOrEqual: 0 }} <!-- false -->
{{ 1 | lessOrEqual: 1 }} <!-- true -->
Returns true if the value are equal (operator ==
).
import { IsEqualPipe } 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 { IsNotEqualPipe } from 'angular-pipes';
{{ 0 | notEqual: 1 }} <!-- true -->
{{ 1 | notEqual: '1' }} <!-- false -->
{{ 1 | notEqual: 1 }} <!-- false -->
Returns true if the value are identical (operator ===
).
import { IsIdenticalPipe } 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 { IsNotIdenticalPipe } from 'angular-pipes';
{{ 0 | notIdentical: 1 }} <!-- true -->
{{ 1 | notIdentical: '1' }} <!-- true -->
{{ 1 | notIdentical: 1 }} <!-- false -->
Returns true if the value if null.
import { IsNullPipe } from 'angular-pipes';
{{ null | isNull }} <!-- true -->
{{ 1 | isNull }} <!-- false -->
Returns true if the value if undefined.
import { IsUndefinedPipe } from 'angular-pipes';
{{ a | isUndefined }} <!-- true if a does not exists -->
{{ 1 | isUndefined }} <!-- false -->
Returns true if the value if null or undefined.
import { IsNilPipe } 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 { IsNumberPipe } from 'angular-pipes';
{{ 'a' | isNumber }} <!-- false -->
{{ 1 | isNumber }} <!-- true -->
Returns true if the value is a string.
import { IsStringPipe } from 'angular-pipes';
{{ 'a' | isString }} <!-- true -->
{{ 1 | isString }} <!-- false -->
Returns true if the value is a function.
import { IsFunctionPipe } from 'angular-pipes';
myFn() {
// ...
}
{{ 'a' | isFunction }} <!-- false -->
{{ myFn | isFunction }} <!-- true -->
Returns true if the value is an array.
import { IsArrayPipe } from 'angular-pipes';
{{ 'a' | isArray }} <!-- false -->
{{ [] | isArray }} <!-- true -->
Returns true if the value is an object.
import { IsObjectPipe } from 'angular-pipes';
{{ 'a' | isObject }} <!-- false -->
{{ {} | isObject }} <!-- true -->
Returns true if the value is defined (nor null nor undefined).
import { IsDefinedPipe } from 'angular-pipes';
{{ 'a' | isDefined }} <!-- true -->
{{ null | isDefined }} <!-- false -->
{{ a | isDefined }} <!-- false if a does not exists -->