Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array-equal

Package Overview
Dependencies
Maintainers
10
Versions
2
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

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2M
decreased by-3.79%
Maintainers
10
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

FAQs

Package last updated on 16 Nov 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc