time-to-botec/squiggle/node_modules/@stdlib/assert/is-nonpositive-number
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
docs feat: add the node modules 2022-12-03 12:44:49 +00:00
lib feat: add the node modules 2022-12-03 12:44:49 +00:00
package.json feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00

isNonPositiveNumber

Test if a value is a number having a nonpositive value.

Usage

var isNonPositiveNumber = require( '@stdlib/assert/is-nonpositive-number' );

isNonPositiveNumber( value )

Tests if a value is a number having a nonpositive value.

var Number = require( '@stdlib/number/ctor' );

var bool = isNonPositiveNumber( -5.0 );
// returns true

bool = isNonPositiveNumber( new Number( -5.0 ) );
// returns true

bool = isNonPositiveNumber( -3.14 );
// returns true

bool = isNonPositiveNumber( 5.0 );
// returns false

bool = isNonPositiveNumber( null );
// returns false

isNonPositiveNumber.isPrimitive( value )

Tests if a value is a primitive number having a nonpositive value.

var Number = require( '@stdlib/number/ctor' );

var bool = isNonPositiveNumber.isPrimitive( -3.0 );
// returns true

bool = isNonPositiveNumber.isPrimitive( new Number( -3.0 ) );
// returns false

isNonPositiveNumber.isObject( value )

Tests if a value is a Number object having a nonpositive value.

var Number = require( '@stdlib/number/ctor' );

var bool = isNonPositiveNumber.isObject( -3.0 );
// returns false

bool = isNonPositiveNumber.isObject( new Number( -3.0 ) );
// returns true

Examples

var Number = require( '@stdlib/number/ctor' );
var isNonPositiveNumber = require( '@stdlib/assert/is-nonpositive-number' );

var bool = isNonPositiveNumber( -5.0 );
// returns true

bool = isNonPositiveNumber( new Number( -5.0 ) );
// returns true

bool = isNonPositiveNumber( 0.0 );
// returns true

bool = isNonPositiveNumber( -3.14 );
// returns true

bool = isNonPositiveNumber( 5.0 );
// returns false

bool = isNonPositiveNumber( '-5' );
// returns false

bool = isNonPositiveNumber( null );
// returns false