\#object-\/is \textsuperscript{\href{https://npmjs.org/package/object-is}{\texttt{ }}}

\href{https://travis-ci.org/es-shims/object-is}{\texttt{ }} \href{https://david-dm.org/es-shims/object-is}{\texttt{ }} \href{https://david-dm.org/es-shims/object-is\#info=devDependencies}{\texttt{ }} \mbox{[}\mbox{]}\mbox{[}license-\/url\mbox{]} \href{http://npm-stat.com/charts.html?package=object-is}{\texttt{ }}

\href{https://npmjs.org/package/object-is}{\texttt{ }}

ES2015-\/compliant shim for Object.\+is -\/ differentiates between -\/0 and +0, and can compare to NaN.

Essentially, Object.\+is returns the same value as === -\/ but true for NaN, and false for -\/0 and +0.\hypertarget{md_sfcode_node_modules_object_is_README_autotoc_md18830}{}\doxysubsection{Example}\label{md_sfcode_node_modules_object_is_README_autotoc_md18830}

\begin{DoxyCode}{0}
\DoxyCodeLine{Object.is = require('object-\/is');}
\DoxyCodeLine{var assert = require('assert');}
\DoxyCodeLine{}
\DoxyCodeLine{assert.ok(Object.is());}
\DoxyCodeLine{assert.ok(Object.is(undefined));}
\DoxyCodeLine{assert.ok(Object.is(undefined, undefined));}
\DoxyCodeLine{assert.ok(Object.is(null, null));}
\DoxyCodeLine{assert.ok(Object.is(true, true));}
\DoxyCodeLine{assert.ok(Object.is(false, false));}
\DoxyCodeLine{assert.ok(Object.is('foo', 'foo'));}
\DoxyCodeLine{}
\DoxyCodeLine{var arr = [1, 2];}
\DoxyCodeLine{assert.ok(Object.is(arr, arr));}
\DoxyCodeLine{assert.notOk(Object.is(arr, [1, 2]));}
\DoxyCodeLine{}
\DoxyCodeLine{assert.ok(Object.is(0, 0));}
\DoxyCodeLine{assert.ok(Object.is(-\/0, -\/0));}
\DoxyCodeLine{assert.notOk(Object.is(0, -\/0));}
\DoxyCodeLine{}
\DoxyCodeLine{assert.ok(Object.is(NaN, NaN));}
\DoxyCodeLine{assert.ok(Object.is(Infinity, Infinity));}
\DoxyCodeLine{assert.ok(Object.is(-\/Infinity, -\/Infinity)); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_object_is_README_autotoc_md18831}{}\doxysubsection{Tests}\label{md_sfcode_node_modules_object_is_README_autotoc_md18831}
Simply clone the repo, {\ttfamily npm install}, and run {\ttfamily npm test} 