🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

array-equal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-equal

Check if two arrays are equal

2.0.0
latest
Source
npm
Version published
Weekly downloads
3.2M
17.29%
Maintainers
1
Weekly downloads
 
Created

What is array-equal?

The array-equal npm package is a simple utility for checking if two arrays are equal. It performs a deep comparison to determine if the arrays contain the same elements in the same order.

What are array-equal's main functionalities?

Basic Array Equality Check

This feature allows you to check if two arrays are equal by comparing their elements in order. If all elements match, it returns true; otherwise, it returns false.

const arrayEqual = require('array-equal');
const arr1 = [1, 2, 3];
const arr2 = [1, 2, 3];
console.log(arrayEqual(arr1, arr2)); // true

Nested Array Equality Check

This feature allows you to check if two nested arrays are equal. It performs a deep comparison to ensure that all nested elements match.

const arrayEqual = require('array-equal');
const arr1 = [1, [2, 3], 4];
const arr2 = [1, [2, 3], 4];
console.log(arrayEqual(arr1, arr2)); // true

Other packages similar to array-equal

Keywords

array

FAQs

Package last updated on 08 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts