https://github.com/xotic750/same-value-x
Determines whether two values are the same value.
https://github.com/xotic750/same-value-x
browser is javascript nodejs object samevalue
Last synced: 12 months ago
JSON representation
Determines whether two values are the same value.
- Host: GitHub
- URL: https://github.com/xotic750/same-value-x
- Owner: Xotic750
- License: mit
- Created: 2017-09-01T23:06:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:58:50.000Z (over 3 years ago)
- Last Synced: 2025-04-19T17:19:40.138Z (about 1 year ago)
- Topics: browser, is, javascript, nodejs, object, samevalue
- Language: JavaScript
- Size: 3.07 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## same-value-x
Determines whether two values are the same value.
### `module.exports(value1, value2)` ⇒ boolean ⏏
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
```