MCPcopy Index your code
hub / github.com/formatjs/formatjs / SameValue

Function SameValue

packages/ecma262-abstract/SameValue.ts:4–12  ·  view source on GitHub ↗
(x: any, y: any)

Source from the content-addressed store, hash-verified

2 * https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
3 */
4export function SameValue(x: any, y: any): boolean {
5 if (Object.is) {
6 return Object.is(x, y)
7 }
8 if (x === y) {
9 return x !== 0 || 1 / x === 1 / y
10 }
11 return x !== x && y !== y
12}

Callers 3

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected