license const hasOwnProperty = Object . prototype . hasOwnProperty ; export function shallowEqualsPartial ( state , partial ) { const partialKeys = Object . keys ( partial ) ; for ( let i = 0 ; i < partialKeys . length ; i ++ ) { const key = partialKeys [ i ] ; const partialValue = partial [ key ] ; if ( state [ key ] !== partialValue || ( partialValue === undefined && ! hasOwnProperty . call ( state , key ) ) ) { return false ; } } return true ; }