\begin{quote}
Sort the keys of an object \end{quote}
Useful to get a deterministically ordered object, as the order of keys can vary between engines.\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28213}{}\doxysection{Install}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28213}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save sort-\/keys }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28214}{}\doxysection{Usage}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28214}

\begin{DoxyCode}{0}
\DoxyCodeLine{const sortKeys = require('sort-\/keys');}
\DoxyCodeLine{}
\DoxyCodeLine{sortKeys(\{c: 0, a: 0, b: 0\});}
\DoxyCodeLine{//=> \{a: 0, b: 0, c: 0\}}
\DoxyCodeLine{}
\DoxyCodeLine{sortKeys(\{b: \{b: 0, a: 0\}, a: 0\}, \{deep: true\});}
\DoxyCodeLine{//=> \{a: 0, b: \{a: 0, b: 0\}\}}
\DoxyCodeLine{}
\DoxyCodeLine{sortKeys(\{c: 0, a: 0, b: 0\}, \{}
\DoxyCodeLine{    compare: (a, b) => -\/a.localeCompare(b)}
\DoxyCodeLine{\});}
\DoxyCodeLine{//=> \{c: 0, b: 0, a: 0\} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28215}{}\doxysection{API}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28215}
\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28216}{}\doxysubsection{sort\+Keys(input, \mbox{[}options\mbox{]})}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28216}
Returns a new object with sorted keys.\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28217}{}\doxysubsubsection{input}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28217}
Type\+: {\ttfamily Object}\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28218}{}\doxysubsubsection{options}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28218}
\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28219}{}\doxyparagraph{deep}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28219}
Type\+: {\ttfamily boolean}

Recursively sort keys.\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28220}{}\doxyparagraph{compare}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28220}
Type\+: {\ttfamily Function}

\href{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort}{\texttt{ Compare function.}}\hypertarget{md_sfcode_node_modules_sort_keys_readme_autotoc_md28221}{}\doxysection{License}\label{md_sfcode_node_modules_sort_keys_readme_autotoc_md28221}
MIT © \href{https://sindresorhus.com}{\texttt{ Sindre Sorhus}} 