\begin{quote}
\href{https://en.wikipedia.org/wiki/Swizzling_(computer_graphics)}{\texttt{ Swizzle}} your function arguments; pass in mixed arrays/values and get a clean array \end{quote}
\hypertarget{md_sfcode_node_modules_simple_swizzle_README_autotoc_md27028}{}\doxysection{Usage}\label{md_sfcode_node_modules_simple_swizzle_README_autotoc_md27028}

\begin{DoxyCode}{0}
\DoxyCodeLine{var swizzle = require('simple-\/swizzle');}
\DoxyCodeLine{}
\DoxyCodeLine{function myFunc() \{}
\DoxyCodeLine{    var args = swizzle(arguments);}
\DoxyCodeLine{    // ...}
\DoxyCodeLine{    return args;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{myFunc(1, [2, 3], 4); // [1, 2, 3, 4]}
\DoxyCodeLine{myFunc(1, 2, 3, 4);   // [1, 2, 3, 4]}
\DoxyCodeLine{myFunc([1, 2, 3, 4]); // [1, 2, 3, 4] }

\end{DoxyCode}


Functions can also be wrapped to automatically swizzle arguments and be passed the resulting array.


\begin{DoxyCode}{0}
\DoxyCodeLine{var swizzle = require('simple-\/swizzle');}
\DoxyCodeLine{}
\DoxyCodeLine{var swizzledFn = swizzle.wrap(function (args) \{}
\DoxyCodeLine{    // ...}
\DoxyCodeLine{    return args;}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{swizzledFn(1, [2, 3], 4); // [1, 2, 3, 4]}
\DoxyCodeLine{swizzledFn(1, 2, 3, 4);   // [1, 2, 3, 4]}
\DoxyCodeLine{swizzledFn([1, 2, 3, 4]); // [1, 2, 3, 4] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_simple_swizzle_README_autotoc_md27029}{}\doxysection{License}\label{md_sfcode_node_modules_simple_swizzle_README_autotoc_md27029}
Licensed under the \href{http://opensource.org/licenses/MIT}{\texttt{ MIT License}}. You can find a copy of it in \mbox{[}LICENSE\mbox{]}(LICENSE). 