assert-is-equal-uint8clampedarray
Test if two arguments are both Uint8ClampedArrays and have equal values.
https://github.com/t2frmdam22/assert-is-equal-uint8clampedarray
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.0%) to scientific vocabulary
Keywords
Repository
Test if two arguments are both Uint8ClampedArrays and have equal values.
Basic Info
- Host: GitHub
- Owner: t2frmdam22
- License: apache-2.0
- Language: JavaScript
- Default Branch: main
- Size: 45.9 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
assert-is-equal-uint8clampedarray
Overview
Welcome to the assert-is-equal-uint8clampedarray repository! This utility checks if two arguments are both Uint8ClampedArrays and if they contain equal values. This can be particularly useful in scenarios where you need to ensure data integrity in web applications, image processing, or any situation where clamped arrays are involved.
Table of Contents
Installation
To install the package, you can use npm. Run the following command in your terminal:
bash
npm install assert-is-equal-uint8clampedarray
Usage
After installing, you can use the utility in your JavaScript or Node.js projects. Here's a basic example:
```javascript const assertIsEqual = require('assert-is-equal-uint8clampedarray');
const array1 = new Uint8ClampedArray([255, 0, 127]); const array2 = new Uint8ClampedArray([255, 0, 127]);
const result = assertIsEqual(array1, array2); console.log(result); // true ```
API
The main function assertIsEqual takes two arguments:
array1: The firstUint8ClampedArray.array2: The secondUint8ClampedArray.
Return Value
- Returns
trueif both arrays are equal in length and values. - Returns
falseotherwise.
Examples
Example 1: Basic Equality Check
```javascript const array1 = new Uint8ClampedArray([100, 200, 150]); const array2 = new Uint8ClampedArray([100, 200, 150]);
console.log(assertIsEqual(array1, array2)); // true ```
Example 2: Different Values
```javascript const array1 = new Uint8ClampedArray([100, 200, 150]); const array2 = new Uint8ClampedArray([100, 200, 151]);
console.log(assertIsEqual(array1, array2)); // false ```
Example 3: Different Lengths
```javascript const array1 = new Uint8ClampedArray([100, 200]); const array2 = new Uint8ClampedArray([100, 200, 150]);
console.log(assertIsEqual(array1, array2)); // false ```
Contributing
We welcome contributions! If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature/YourFeature). - Open a pull request.
Please ensure your code adheres to the existing style and includes appropriate tests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Releases
For the latest releases, visit the Releases section. You can download the latest version and execute it as needed.
Additional Resources
For any questions or issues, please check the Releases section or open an issue in the repository.
Owner
- Login: t2frmdam22
- Kind: user
- Repositories: 1
- Profile: https://github.com/t2frmdam22
Citation (CITATION.cff)
cff-version: 1.2.0
title: stdlib
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- name: The Stdlib Authors
url: https://github.com/stdlib-js/stdlib/graphs/contributors
repository-code: https://github.com/stdlib-js/stdlib
url: https://stdlib.io
abstract: |
Standard library for JavaScript and Node.js.
keywords:
- JavaScript
- Node.js
- TypeScript
- standard library
- scientific computing
- numerical computing
- statistical computing
license: Apache-2.0 AND BSL-1.0
date-released: 2016
GitHub Events
Total
- Push event: 396
- Create event: 2
Last Year
- Push event: 396
- Create event: 2
Dependencies
- @stdlib/array-typed ^0.3.0 development
- @stdlib/array-uint8c ^0.2.2 development
- @stdlib/array-zero-to ^0.2.2 development
- @stdlib/assert-is-boolean ^0.2.2 development
- @stdlib/bench-harness ^0.2.2 development
- @stdlib/math-base-special-pow ^0.3.0 development
- istanbul ^0.4.1 development
- tap-min git+https://github.com/Planeshifter/tap-min.git development
- tape git+https://github.com/kgryte/tape.git#fix/globby development
- @stdlib/array-base-assert-has-equal-values github:stdlib-js/array-base-assert-has-equal-values#main
- @stdlib/assert-is-uint8clampedarray ^0.2.2