assert-is-equal-uint32array

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

https://github.com/jemma0529/assert-is-equal-uint32array

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 (13.5%) 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 Uint32Arrays and have equal values.

Basic Info
  • Host: GitHub
  • Owner: Jemma0529
  • 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 Uint32Array

GitHub Release GitHub Issues GitHub Stars

Overview

Welcome to the Assert Is Equal Uint32Array repository! This project provides a simple utility to test if two arguments are both Uint32Arrays and if they contain equal values. This function is essential for developers working with typed arrays in JavaScript, particularly in Node.js environments.

Table of Contents

  1. Features
  2. Installation
  3. Usage
  4. API
  5. Examples
  6. Contributing
  7. License
  8. Releases

Features

  • Type Checking: Ensure both inputs are Uint32Arrays.
  • Value Comparison: Check if the arrays have the same values.
  • Lightweight: Minimal dependencies for quick integration.
  • Node.js Compatibility: Works seamlessly in Node.js environments.

Installation

To install the package, you can use npm or yarn. Run one of the following commands in your terminal:

bash npm install assert-is-equal-uint32array

or

bash yarn add assert-is-equal-uint32array

Usage

After installation, you can import the utility into your project. Here’s how to do it:

javascript const assertIsEqualUint32Array = require('assert-is-equal-uint32array');

Now you can use the function to compare two Uint32Arrays.

API

assertIsEqualUint32Array(arr1, arr2)

  • Parameters:

    • arr1 - The first Uint32Array to compare.
    • arr2 - The second Uint32Array to compare.
  • Returns: true if both arrays are equal, false otherwise.

Example

```javascript const arr1 = new Uint32Array([1, 2, 3]); const arr2 = new Uint32Array([1, 2, 3]); const arr3 = new Uint32Array([4, 5, 6]);

console.log(assertIsEqualUint32Array(arr1, arr2)); // true console.log(assertIsEqualUint32Array(arr1, arr3)); // false ```

Examples

Here are a few more examples to illustrate how the utility works.

Example 1: Equal Arrays

```javascript const a = new Uint32Array([10, 20, 30]); const b = new Uint32Array([10, 20, 30]);

console.log(assertIsEqualUint32Array(a, b)); // true ```

Example 2: Unequal Arrays

```javascript const a = new Uint32Array([1, 2, 3]); const b = new Uint32Array([1, 2, 4]);

console.log(assertIsEqualUint32Array(a, b)); // false ```

Example 3: Different Types

```javascript const a = new Uint32Array([1, 2, 3]); const b = [1, 2, 3]; // Not a Uint32Array

console.log(assertIsEqualUint32Array(a, b)); // false ```

Contributing

We welcome contributions to this project! If you would like to help, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes.
  4. Write tests for your changes.
  5. Submit a pull request.

Please ensure that your code adheres to the existing style and includes relevant tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

To view the latest releases, please visit the Releases section. You can download the latest version from there and follow the instructions to integrate it into your project.

Conclusion

Thank you for checking out the Assert Is Equal Uint32Array repository! We hope this utility helps you with your JavaScript projects. If you have any questions or suggestions, feel free to open an issue or submit a pull request.

For more information on releases, please visit the Releases page.

Owner

  • Login: Jemma0529
  • 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: 401
  • Create event: 1
Last Year
  • Push event: 401
  • Create event: 1

Dependencies

package.json npm
  • @stdlib/array-typed ^0.3.0 development
  • @stdlib/array-uint32 ^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-uint32array ^0.2.2