Socket
Socket
Sign inDemoInstall

@lourd/equal-by-keys

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

@lourd/equal-by-keys

Utility function for comparing objects only for given keys


Version published
Maintainers
1
Created
Source

@lourd/equal-by-keys npm package badge Build status

This single-function JavaScript module is a utility for comparing two objects for a given set of keys. I find it handy when looking for changing props in React component lifecycle methods like componentDidUpdate.

Installation

npm

yarn install @lourd/equal-by-keys

In the browser

Available as a simple <script> through unpkg.com at https://unpkg.com/@lourd/equal-by-keys. The function will be available as the global variable equalByKeys.

API

equalByKeys(objA: Object, objB: Object, ...keys: [String])

Keywords

FAQs

Package last updated on 27 Jan 2018

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