assert-is-equal-int8array

Test if two arguments are both Int8Arrays and have equal values.

https://github.com/ictechno/assert-is-equal-int8array

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

assert assertion check equal is isequal isstrictequal javascript nodejs same stdlib strict type util utilities utility utils valid
Last synced: 6 months ago · JSON representation ·

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
assert assertion check equal is isequal isstrictequal javascript nodejs same stdlib strict type util utilities utility utils valid
Created 9 months ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security

README.md

assert-is-equal-int8array

GitHub release
Visit Releases

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 first Int8Array to compare.
    • array2: The second Int8Array to compare.
  • Returns:

    • true if both arrays are equal in type and value.
    • false otherwise.

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:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature/YourFeature).
  6. 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

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

package.json npm
  • @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