MCPcopy
hub / github.com/preactjs/preact / shallowDiffers

Function shallowDiffers

compat/src/util.js:19–23  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

17 * @returns {boolean}
18 */
19export function shallowDiffers(a, b) {
20 for (let i in a) if (i !== '__source' && !(i in b)) return true;
21 for (let i in b) if (i !== '__source' && a[i] !== b[i]) return true;
22 return false;
23}
24
25/**
26 * Check if two values are the same value

Callers 2

PureComponent.jsFile · 0.90
shouldUpdateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…