aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/object/is.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es5-ext/object/is.js')
-rw-r--r--node_modules/es5-ext/object/is.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/node_modules/es5-ext/object/is.js b/node_modules/es5-ext/object/is.js
new file mode 100644
index 000000000..54baadec8
--- /dev/null
+++ b/node_modules/es5-ext/object/is.js
@@ -0,0 +1,10 @@
+// Implementation credits go to:
+// http://wiki.ecmascript.org/doku.php?id=harmony:egal
+
+"use strict";
+
+var numIsNaN = require("../number/is-nan");
+
+module.exports = function (val1, val2) {
+ return val1 === val2 ? val1 !== 0 || 1 / val1 === 1 / val2 : numIsNaN(val1) && numIsNaN(val2);
+};