Skip to content

Instantly share code, notes, and snippets.

@cooltoast
Created May 25, 2018 06:08
Show Gist options
  • Save cooltoast/cedb3b934057679ca15721a0819334f0 to your computer and use it in GitHub Desktop.
Save cooltoast/cedb3b934057679ca15721a0819334f0 to your computer and use it in GitHub Desktop.
const diffProps = (before, after) => (
Object.keys(after).map(k => before[k] !== after[k] ? {[k]: [before[k], after[k]]} : null).filter(x => x)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment