time-to-botec/js/node_modules/@stdlib/assert/is-negative-zero
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

isNegativeZero

Test if a value is a number equal to negative zero.

Usage

var isNegativeZero = require( '@stdlib/assert/is-negative-zero' );

isNegativeZero( value )

Tests if a value is a number having a value equal to negative zero.

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

var bool = isNegativeZero( -0.0 );
// returns true

bool = isNegativeZero( new Number( -0.0 ) );
// returns true

bool = isNegativeZero( -3.14 );
// returns false

bool = isNegativeZero( 0.0 );
// returns false

bool = isNegativeZero( null );
// returns false

isNegativeZero.isPrimitive( value )

Tests if a value is a primitive number equal to negative zero.

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

var bool = isNegativeZero.isPrimitive( -0.0 );
// returns true

bool = isNegativeZero.isPrimitive( new Number( -0.0 ) );
// returns false

isNegativeZero.isObject( value )

Tests if a value is a Number object having a value equal to negative zero.

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

var bool = isNegativeZero.isObject( -0.0 );
// returns false

bool = isNegativeZero.isObject( new Number( -0.0 ) );
// returns true

Examples

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

var bool = isNegativeZero( -0.0 );
// returns true

bool = isNegativeZero( new Number( -0.0 ) );
// returns true

bool = isNegativeZero( -3.14 );
// returns false

bool = isNegativeZero( 0.0 );
// returns false

bool = isNegativeZero( 5.0 );
// returns false

bool = isNegativeZero( '-0' );
// returns false

bool = isNegativeZero( null );
// returns false