@lourd/equal-by-keys

0.1.2 • Public • Published

@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])

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    4
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @lourd/equal-by-keys

Weekly Downloads

4

Version

0.1.2

License

MIT

Last publish

Collaborators

  • lourd