Skip to content

Utility function for checking whether object props have changed

Notifications You must be signed in to change notification settings

ilyabo/any-prop-changed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

any-prop-changed

Utility function for checking whether object props have changed

Installation

Add as an npm dependency to your project:

npm install any-prop-changed --save

Examples

var anyPropChanged = require('any-prop-changed')

anyPropChanged(['a', 'b'], { a: 1, b: 1 }, { a: 1, b: 1 })   // false
anyPropChanged(['a', 'b'], { a: 1, b: 1 }, { a: 1, b: 2 })   // true

anyPropChanged(['a.b.c'], { a: { b: { c: 1 }} },  { a: { b: { c: 1 }} })   // false
anyPropChanged(['a.b.c'],  { a: { b: { c: 1 }} },  { a: { b: { c: 2 }} })  // true

About

Utility function for checking whether object props have changed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published