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

@wry/equality

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wry/equality

Structural equality checking for JavaScript values

  • 0.3.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9M
decreased by-5.47%
Maintainers
1
Weekly downloads
 
Created

What is @wry/equality?

@wry/equality is a lightweight JavaScript library designed to perform deep equality checks. It is particularly useful for comparing complex objects and arrays to determine if they are equivalent in value.

What are @wry/equality's main functionalities?

Deep Equality Check

This feature allows you to perform deep equality checks between two objects or arrays. The `equal` function will return `true` if the objects or arrays have the same structure and values.

const { equal } = require('@wry/equality');
const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { a: 1, b: { c: 2 } };
console.log(equal(obj1, obj2)); // true

Shallow Equality Check

This feature allows you to perform shallow equality checks between two arrays. The `equal` function will return `true` if the arrays have the same elements in the same order.

const { equal } = require('@wry/equality');
const arr1 = [1, 2, 3];
const arr2 = [1, 2, 3];
console.log(equal(arr1, arr2)); // true

Other packages similar to @wry/equality

FAQs

Package last updated on 05 Mar 2021

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