@stdlib/array-base-assert-is-boolean-data-type
v0.0.1
Published
Test if an input value is a supported array boolean data type.
Downloads
326
Readme
isBooleanDataType
Test if an input value is a supported array boolean data type.
Installation
npm install @stdlib/array-base-assert-is-boolean-data-type
Usage
var isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' );
isBooleanDataType( value )
Tests if an input value
is a supported array boolean data type.
var bool = isBooleanDataType( 'bool' );
// returns true
bool = isBooleanDataType( 'uint32' );
// returns false
Examples
var isBooleanDataType = require( '@stdlib/array-base-assert-is-boolean-data-type' );
var bool = isBooleanDataType( 'bool' );
// returns true
bool = isBooleanDataType( 'complex64' );
// returns false
bool = isBooleanDataType( 'complex128' );
// returns false
bool = isBooleanDataType( 'float32' );
// returns false
bool = isBooleanDataType( 'float64' );
// returns false
bool = isBooleanDataType( 'generic' );
// returns false
bool = isBooleanDataType( 'int16' );
// returns false
bool = isBooleanDataType( 'int32' );
// returns false
bool = isBooleanDataType( 'int8' );
// returns false
bool = isBooleanDataType( 'uint16' );
// returns false
bool = isBooleanDataType( 'uint32' );
// returns false
bool = isBooleanDataType( 'uint8' );
// returns false
bool = isBooleanDataType( 'uint8c' );
// returns false
bool = isBooleanDataType( '' );
// returns false
bool = isBooleanDataType( 'foo' );
// returns false
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.