Created
December 15, 2016 22:18
-
-
Save dabbott/24aeb2851e31911bf898b54fbd2365c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compareProps = (a, b) => { | |
for (let key in a) { | |
if (a[key] !== b[key]) console.log('Changed:', key, a[key], '=>', b[key]); | |
} | |
for (let key in b) { | |
if (!(key in a)) console.log('Added:', key, b[key]); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment