1 2 3 4 5 6 7 8 9 10 11 | 19x 18x 16x 28x 27x 6x | // @flow export function shallowDiffers(a: any, b: any) { if(typeof a !== typeof b) return true; if (typeof a !== 'object') return a != b; for (let i in a) { if (!(i in b)) return true; if (a[i] !== b[i]) return true; } return false } |