isSameBooleanArray

Test if two arguments are both BooleanArrays and have the same values.

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
Did you find this page helpful?