All files shallow-differs.js

100% Statements 8/8
100% Branches 6/6
100% Functions 1/1
100% Lines 4/4
1 2 3 4 5 6 7 8      39x 29x 35x 12x  
// @flow
 
export function shallowDiffers(a: any, b: any) {
    if (typeof a !== 'object') return a != b;
    if (Object.keys(a).length !== Object.keys(b).length) return true;
    for (const i in a) if (a[i] !== b[i]) return true;
    return false
}