Skip to content

@mega-yfue/eufy-sdk / structuralEqual

Function: structuralEqual()

ts
function structuralEqual(a, b): boolean;

Order-insensitive deep structural equality. Used for change detection over decoded param values (boolean | number | string | object | array): a re-serialized param whose object keys come back in a different order must NOT read as "changed" (a JSON.stringify compare is key-order sensitive and flaps). Primitives compare with Object.is (so NaN === NaN, +0 !== -0); arrays compare length then elementwise; plain objects compare the same key set recursively; anything else (functions, class instances, Buffers, …) falls back to Object.is.

Parameters

a

unknown

b

unknown

Returns

boolean

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.