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

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

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

\href{https://ci.testling.com/ljharb/object-keys}{\texttt{ }}

An Object.\+keys shim. Invoke its \char`\"{}shim\char`\"{} method to shim Object.\+keys if it is unavailable.

Most common usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{var keys = Object.keys || require('object-\/keys'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_object_keys_README_autotoc_md18862}{}\doxysubsection{Example}\label{md_sfcode_node_modules_object_keys_README_autotoc_md18862}

\begin{DoxyCode}{0}
\DoxyCodeLine{var keys = require('object-\/keys');}
\DoxyCodeLine{var assert = require('assert');}
\DoxyCodeLine{var obj = \{}
\DoxyCodeLine{    a: true,}
\DoxyCodeLine{    b: true,}
\DoxyCodeLine{    c: true}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{assert.deepEqual(keys(obj), ['a', 'b', 'c']); }

\end{DoxyCode}



\begin{DoxyCode}{0}
\DoxyCodeLine{var keys = require('object-\/keys');}
\DoxyCodeLine{var assert = require('assert');}
\DoxyCodeLine{/* when Object.keys is not present */}
\DoxyCodeLine{delete Object.keys;}
\DoxyCodeLine{var shimmedKeys = keys.shim();}
\DoxyCodeLine{assert.equal(shimmedKeys, keys);}
\DoxyCodeLine{assert.deepEqual(Object.keys(obj), keys(obj)); }

\end{DoxyCode}



\begin{DoxyCode}{0}
\DoxyCodeLine{var keys = require('object-\/keys');}
\DoxyCodeLine{var assert = require('assert');}
\DoxyCodeLine{/* when Object.keys is present */}
\DoxyCodeLine{var shimmedKeys = keys.shim();}
\DoxyCodeLine{assert.equal(shimmedKeys, Object.keys);}
\DoxyCodeLine{assert.deepEqual(Object.keys(obj), keys(obj)); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_object_keys_README_autotoc_md18863}{}\doxysubsection{Source}\label{md_sfcode_node_modules_object_keys_README_autotoc_md18863}
Implementation taken directly from \href{https://github.com/es-shims/es5-shim/blob/master/es5-shim.js\#L542-589}{\texttt{ es5-\/shim}}, with modifications, including from \href{https://github.com/lodash/lodash}{\texttt{ lodash}}.\hypertarget{md_sfcode_node_modules_object_keys_README_autotoc_md18864}{}\doxysubsection{Tests}\label{md_sfcode_node_modules_object_keys_README_autotoc_md18864}
Simply clone the repo, {\ttfamily npm install}, and run {\ttfamily npm test} 