0.1.2 • Published 6 years ago

@lourd/equal-by-keys v0.1.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

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