isNegativeFinite

Test if a value is a number having a finite negative value.

Usage

var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' );

isNegativeFinite( value )

Tests if a value is a number having a finite negative value.

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

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

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

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

bool = isNegativeFinite( 5.0 );
// returns false

bool = isNegativeFinite( null );
// returns false

bool = isNegativeFinite( -1.0/0.0 );
// returns false

isNegativeFinite.isPrimitive( value )

Tests if a value is a primitive number having a finite negative value.

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

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

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

isNegativeFinite.isObject( value )

Tests if a value is a Number object having a finite negative value.

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

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

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

Examples

var Number = require( '@stdlib/number/ctor' );
var isNegativeFinite = require( '@stdlib/assert/is-negative-finite' );

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

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

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

bool = isNegativeFinite( 0.0 );
// returns false

bool = isNegativeFinite( 5.0 );
// returns false

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

bool = isNegativeFinite( null );
// returns false

bool = isNegativeFinite( -1.0/0.0 );
// returns false

bool = isNegativeFinite( new Number( -1.0/0.0 ) );
// returns false
Did you find this page helpful?