ES6-compliant shim for SameValueZero.
npm install same-value-zero-x href="https://travis-ci.org/Xotic750/same-value-zero-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/same-value-zero-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/same-value-zero-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/same-value-zero-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/same-value-zero-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/same-value-zero-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/same-value-zero-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/same-value-zero-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
ES6-compliant shim for SameValueZero.
See: 7.2.10 SameValueZero(x, y)
This method determines whether two values are the same value.
SameValueZero differs from SameValue (Object.is) only in its treatment
of +0 and -0.
Kind: Exported function
Returns: boolean - A Boolean indicating whether or not the two arguments
are the same value.
| Param | Type | Description |
| ----- | --------------- | ---------------------------- |
| x | \* | The first value to compare. |
| y | \* | The second value to compare. |
Example
``js
import sameValueZero from 'same-value-zero-x';
console.log(sameValueZero(0, 0)); // true
console.log(sameValueZero(-0, -0)); // true
console.log(sameValueZero(0, -0)); // true
console.log(sameValueZero(NaN, NaN)); //true
console.log(sameValueZero(Infinity, Infinity)); // true
console.log(sameValueZero(-Infinity, -Infinity)); // true
``