@stdlib/assert-is-equal-uint8clampedarray
v0.1.0
Published
Test if two arguments are both Uint8ClampedArrays and have equal values.
Downloads
52
Readme
isEqualUint8ClampedArray
Test if two arguments are both Uint8ClampedArrays and have equal values.
Installation
npm install @stdlib/assert-is-equal-uint8clampedarrayUsage
var isEqualUint8ClampedArray = require( '@stdlib/assert-is-equal-uint8clampedarray' );isEqualUint8ClampedArray( v1, v2 )
Tests if two arguments are both Uint8ClampedArrays and have equal values.
var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
var x = new Uint8ClampedArray( [ 1, 2 ] );
var y = new Uint8ClampedArray( [ 1, 2 ] );
var bool = isEqualUint8ClampedArray( x, y );
// returns true
bool = isEqualUint8ClampedArray( x, new Uint8ClampedArray( [ 1, 3 ] ) );
// returns falseExamples
var Uint8ClampedArray = require( '@stdlib/array-uint8c' );
var isEqualUint8ClampedArray = require( '@stdlib/assert-is-equal-uint8clampedarray' );
var x = new Uint8ClampedArray( [ 1, 2, 3 ] );
var y = new Uint8ClampedArray( [ 1, 2, 3 ] );
var out = isEqualUint8ClampedArray( x, y );
// returns true
x = new Uint8ClampedArray( [ 0, 0, 0 ] );
y = [ 0, 0, 0 ];
out = isEqualUint8ClampedArray( x, y );
// returns false
x = new Uint8ClampedArray( [ 1, 2, 3 ] );
y = new Uint8ClampedArray( [ 1, 2, 4 ] );
out = isEqualUint8ClampedArray( 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.
