@svizzle/utils/number-boolean

Methods

(static) is0(number) → {boolean}

Source:
Since:
  • 0.1.0

Return true if the input number is 0.

Example
> is0(0)
true
> is0(2)
false
Parameters:
Name Type Description
number number
Returns:
Type
boolean

(static) is1(number) → {boolean}

Source:
Since:
  • 0.1.0

Return true if the input number is 1.

Example
> is1(1)
true
> is1(2)
false
Parameters:
Name Type Description
number number
Returns:
Type
boolean

(static) isGT0(number) → {boolean}

Source:
Since:
  • 0.1.0

Return true if the input number is greater than 0.

Example
> isGT0(-1)
false
> isGT0(2)
true
Parameters:
Name Type Description
number number
Returns:
Type
boolean

(static) isGT1(number) → {boolean}

Source:
Since:
  • 0.1.0

Return true if the input number is greater than 1.

Example
> isGT1(0)
false
> isGT1(2)
true
Parameters:
Name Type Description
number number
Returns:
Type
boolean