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

isEmptyString

Test if a value is an empty string.

Usage

var isEmptyString = require( '@stdlib/assert/is-empty-string' );

isEmptyString( value )

Tests if a value is an empty string.

var bool = isEmptyString( '' );
// returns true

bool = isEmptyString( new String( '' ) );
// returns true

isEmptyString.isPrimitive( value )

Tests if a value is an empty primitive string.

var bool = isEmptyString.isPrimitive( '' );
// returns true

bool = isEmptyString.isPrimitive( new String( '' ) );
// returns false

isEmptyString.isObject( value )

Tests if a value is an empty String object.

var bool = isEmptyString.isObject( '' );
// returns false

bool = isEmptyString.isObject( new String( '' ) );
// returns true

Examples

var isEmptyString = require( '@stdlib/assert/is-empty-string' );

var bool = isEmptyString( '' );
// returns true

bool = isEmptyString( new String( '' ) );
// returns true

bool = isEmptyString( 'beep' );
// returns false

bool = isEmptyString( 0 );
// returns false

bool = isEmptyString( null );
// returns false

bool = isEmptyString( void 0 );
// returns false

bool = isEmptyString( {} );
// returns false

bool = isEmptyString( [] );
// returns false

bool = isEmptyString( function empty() {} );
// returns false