{\itshape Function} instance\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_function_autotoc_md9946}{}\doxysection{$<$tt$>$function/is$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_function_autotoc_md9946}
Confirms if given object is a native function


\begin{DoxyCode}{0}
\DoxyCodeLine{const isFunction = require("{}type/function/is"{});}
\DoxyCodeLine{}
\DoxyCodeLine{isFunction(function () \{\}); // true}
\DoxyCodeLine{isFunction(() => \{\}); // true}
\DoxyCodeLine{isFunction(class \{\}); // true}
\DoxyCodeLine{isFunction("{}foo"{}); // false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_function_autotoc_md9947}{}\doxysection{$<$tt$>$function/ensure$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_function_autotoc_md9947}
If given argument is a function object, it is returned back. Otherwise {\ttfamily Type\+Error} is thrown.


\begin{DoxyCode}{0}
\DoxyCodeLine{const ensureFunction = require("{}type/function/ensure"{});}
\DoxyCodeLine{}
\DoxyCodeLine{const fn = function () \{\};}
\DoxyCodeLine{ensureFunction(fn); // fn}
\DoxyCodeLine{ensureFunction(/foo/); // Thrown TypeError: /foo/ is not a function }

\end{DoxyCode}
 