MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _sameValue

Function _sameValue

src/core/runtime/reactivity.js:19–22  ·  view source on GitHub ↗

Object.is semantics: treats NaN===NaN and distinguishes +0/-0

(a, b)

Source from the content-addressed store, hash-verified

17
18/** Object.is semantics: treats NaN===NaN and distinguishes +0/-0 */
19function _sameValue(a, b) {
20 // eslint-disable-next-line no-self-compare
21 return a === b ? (a !== 0 || 1 / a === 1 / b) : (a !== a && b !== b);
22}
23
24/**
25 * A reactive effect. Re-runs when its dependencies change.

Callers 1

runMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected