A {\itshape Function} instance that is not a {\itshape Class}\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_plain_function_autotoc_md9966}{}\doxysection{$<$tt$>$plain-\/function/is$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_plain_function_autotoc_md9966}
Confirms if given object is a {\itshape plain function}


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

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


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

\end{DoxyCode}
 