Socket
Socket
Sign inDemoInstall

equal-strategies

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    equal-strategies

Equality evaluation strategies


Version published
Weekly downloads
4
Maintainers
1
Install size
74.3 kB
Created
Weekly downloads
 

Readme

Source

equal-strategies

Version Vulnerabilities License Types

Equality evaluation strategies.

Install

npm install equal-strategies

Usage

Strategies

There are four comparison strategies:

strict(value: any, query: any): boolean

Simple strict equality comparison.

partial(value: any, query: any): boolean

Shallow equality comparison that ignores any missing properties in value and strict compares arrays.

shallow(value: any, query: any): boolean

Shallow equality comparison.

deep(value: any, query: any): boolean

Deep equality comparison.

Utils

compare(kind: string, value: any, query: any): boolean

A conveniency function, with kind being either "strict", "partial", "shallow", or "deep".

Keywords

FAQs

Last updated on 31 May 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc