const diff = require('recursive-diff'); const oldVal = {a:1}; const newVal = {a:2}; const delta = diff.getDiff(oldVal, newVal); console.log(delta)