Determines whether two values are the same value.
npm install same-value-x href="https://travis-ci.org/Xotic750/same-value-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/same-value-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/same-value-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/same-value-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/same-value-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/same-value-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/same-value-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/same-value-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Determines whether two values are the same value.
This method is the comparison abstract operation SameValue(x, y), where x
and y are ECMAScript language values, produces true or false.
Kind: Exported function
Returns: boolean - A Boolean indicating whether or not the two arguments are
the same value.
| Param | Type | Description |
| ------ | --------------- | ---------------------------- |
| value1 | \* | The first value to compare. |
| value2 | \* | The second value to compare. |
Example
``js
import sameValue from 'same-value-x';
console.log(sameValue(1, 1)); // true
console.log(sameValue(true, true)); // true
console.log(sameValue(NaN, NaN)); // true
console.log(sameValue(true, false)); // false
console.log(sameValue(0, -0)); // false
``