@stdlib/assert-is-equal-int32array
v0.1.1
Published
Test if two arguments are both Int32Arrays and have equal values.
Downloads
170
Readme
isEqualInt32Array
Test if two arguments are both Int32Arrays and have equal values.
Installation
npm install @stdlib/assert-is-equal-int32arrayUsage
var isEqualInt32Array = require( '@stdlib/assert-is-equal-int32array' );isEqualInt32Array( v1, v2 )
Tests if two arguments are both Int32Arrays and have equal values.
var Int32Array = require( '@stdlib/array-int32' );
var x = new Int32Array( [ 1, 2 ] );
var y = new Int32Array( [ 1, 2 ] );
var bool = isEqualInt32Array( x, y );
// returns true
bool = isEqualInt32Array( x, new Int32Array( [ 1, 3 ] ) );
// returns falseExamples
var Int32Array = require( '@stdlib/array-int32' );
var isEqualInt32Array = require( '@stdlib/assert-is-equal-int32array' );
var x = new Int32Array( [ 1, 2, 3 ] );
var y = new Int32Array( [ 1, 2, 3 ] );
var out = isEqualInt32Array( x, y );
// returns true
x = new Int32Array( [ 0, 0, 0 ] );
y = [ 0, 0, 0 ];
out = isEqualInt32Array( x, y );
// returns false
x = new Int32Array( [ 1, 2, 3 ] );
y = new Int32Array( [ 1, 2, 4 ] );
out = isEqualInt32Array( x, y );
// returns falseNotice
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-2026. The Stdlib Authors.
