assert-is-equal-int8array
Test if two arguments are both Int8Arrays and have equal values.
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 (12.4%) to scientific vocabulary
Keywords
Repository
Test if two arguments are both Int8Arrays and have equal values.
Basic Info
- Host: GitHub
- Owner: ictechno
- 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-int8array
Overview
The assert-is-equal-int8array library provides a simple and effective way to test if two arguments are both Int8Arrays and have equal values. This utility is particularly useful for developers who need to perform strict type checks and value comparisons in JavaScript applications.
Table of Contents
Features
- Type Safety: Ensures both arguments are
Int8Arrays. - Value Comparison: Checks if the contents of both arrays are equal.
- Lightweight: Minimal footprint for your applications.
- Easy Integration: Simple API that fits well into existing projects.
Installation
You can install assert-is-equal-int8array via npm. Run the following command in your terminal:
bash
npm install assert-is-equal-int8array
Usage
To use the library, simply import it into your JavaScript file and call the function with two Int8Array arguments.
```javascript const assertIsEqualInt8Array = require('assert-is-equal-int8array');
const array1 = new Int8Array([1, 2, 3]); const array2 = new Int8Array([1, 2, 3]);
const isEqual = assertIsEqualInt8Array(array1, array2); console.log(isEqual); // true ```
API
assertIsEqualInt8Array(array1, array2)
Parameters:
array1: The firstInt8Arrayto compare.array2: The secondInt8Arrayto compare.
Returns:
trueif both arrays are equal in type and value.falseotherwise.
Example
```javascript const array1 = new Int8Array([1, 2, 3]); const array2 = new Int8Array([1, 2, 3]); const array3 = new Int8Array([4, 5, 6]);
console.log(assertIsEqualInt8Array(array1, array2)); // true console.log(assertIsEqualInt8Array(array1, array3)); // false ```
Examples
Here are some more examples to illustrate the usage of assert-is-equal-int8array.
Example 1: Equal Arrays
```javascript const array1 = new Int8Array([10, 20, 30]); const array2 = new Int8Array([10, 20, 30]);
console.log(assertIsEqualInt8Array(array1, array2)); // true ```
Example 2: Different Arrays
```javascript const array1 = new Int8Array([1, 2, 3]); const array2 = new Int8Array([1, 2, 4]);
console.log(assertIsEqualInt8Array(array1, array2)); // false ```
Example 3: Different Types
```javascript const array1 = new Int8Array([1, 2, 3]); const notAnArray = [1, 2, 3];
console.log(assertIsEqualInt8Array(array1, notAnArray)); // false ```
Contributing
We welcome contributions to improve assert-is-equal-int8array. If you want 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 our coding standards and includes appropriate tests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
For any issues or questions, please check the Releases section. If you can't find an answer, feel free to open an issue in the repository.
Thank you for using assert-is-equal-int8array. We hope this library makes your development easier and more efficient!
Owner
- Login: ictechno
- Kind: user
- Repositories: 1
- Profile: https://github.com/ictechno
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: 408
- Create event: 2
Last Year
- Push event: 408
- Create event: 2
Dependencies
- @stdlib/array-int8 ^0.2.2 development
- @stdlib/array-typed ^0.3.0 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-int8array ^0.2.2