value-equal
value-equal
determines if two JavaScript values are equal using Object.prototype.valueOf
.
In many instances when I'm checking for object equality, what I really want to know is if their values are equal. This is good for:
Stuff you keep in
localStorage
window.history.state
valuesQuery strings
Installation
Using npm:
Then with a module bundler like webpack, use as you would anything else:
The UMD build is also available on unpkg:
You can find the library on window.valueEqual
.
Usage
That's it. Enjoy!
Last updated