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

Package Sidebar

Install

npm i @lourd/equal-by-keys

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • lourd