MCPcopy Create free account
hub / github.com/denoland/std / sameValueZero

Function sameValueZero

assert/equal.ts:85–87  ·  view source on GitHub ↗

Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`)

(a: unknown, b: unknown)

Source from the content-addressed store, hash-verified

83
84/** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
85function sameValueZero(a: unknown, b: unknown) {
86 return a === b || Object.is(a, b);
87}
88
89/**
90 * Deep equality comparison used in assertions.

Callers 2

compareTypedArraysFunction · 0.70
equalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected