@lourd/equal-by-keys
v0.1.2
Published
Utility function for comparing objects only for given keys
Downloads
14
Maintainers
Readme
@lourd/equal-by-keys
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
.