@stdlib/assert-is-same-booleanarray
v0.1.0
Published
Test if two arguments are both BooleanArrays and have the same values.
Downloads
8
Readme
isSameBooleanArray
Test if two arguments are both BooleanArrays and have the same values.
Installation
npm install @stdlib/assert-is-same-booleanarray
Usage
var isSameBooleanArray = require( '@stdlib/assert-is-same-booleanarray' );
isSameBooleanArray( v1, v2 )
Tests if two arguments are both BooleanArrays and have the same values.
var BooleanArray = require( '@stdlib/array-bool' );
var x = new BooleanArray( [ true, false ] );
var y = new BooleanArray( [ true, false ] );
var bool = isSameBooleanArray( x, y );
// returns true
bool = isSameBooleanArray( x, [ true, false ] );
// returns false
Examples
var BooleanArray = require( '@stdlib/array-bool' );
var isSameBooleanArray = require( '@stdlib/assert-is-same-booleanarray' );
var x = new BooleanArray( [ true, false, false, true ] );
var y = new BooleanArray( [ true, false, false, true ] );
var out = isSameBooleanArray( x, y );
// returns true
x = new BooleanArray( [ true, false, false, true ] );
y = new BooleanArray( [ true, true, false, false ] );
out = isSameBooleanArray( x, y );
// 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.