]> gerrit.simantics Code Review - simantics/district.git/blob - is.js
5778b502d924cd52e837bf8cdee0947f3b131df7
[simantics/district.git] / is.js
1 // Implementation credits go to:
2 // http://wiki.ecmascript.org/doku.php?id=harmony:egal
3
4 'use strict';
5
6 module.exports = function (x, y) {
7         return (x === y) ?
8                         ((x !== 0) || ((1 / x) === (1 / y))) :
9                         ((x !== x) && (y !== y)); //jslint: ignore
10 };