{\itshape Reg\+Exp} instance\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_reg_exp_autotoc_md9979}{}\doxysection{$<$tt$>$reg-\/exp/is$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_reg_exp_autotoc_md9979}
Confirms if given object is a native regular expression object


\begin{DoxyCode}{0}
\DoxyCodeLine{const isRegExp = require("{}type/reg-\/exp/is"{});}
\DoxyCodeLine{}
\DoxyCodeLine{isRegExp(/foo/);}
\DoxyCodeLine{isRegExp(\{\}); // false}
\DoxyCodeLine{isRegExp("{}foo"{}); // false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_ext_node_modules_type_docs_reg_exp_autotoc_md9980}{}\doxysection{$<$tt$>$reg-\/exp/ensure$<$/tt$>$}\label{md_sfcode_node_modules_ext_node_modules_type_docs_reg_exp_autotoc_md9980}
If given argument is a regular expression object, it is returned back. Otherwise {\ttfamily Type\+Error} is thrown.


\begin{DoxyCode}{0}
\DoxyCodeLine{const ensureRegExp = require("{}type/reg-\/exp/ensure"{});}
\DoxyCodeLine{}
\DoxyCodeLine{ensureRegExp(/foo/); // /foo/}
\DoxyCodeLine{ensureRegExp("{}foo"{}); // Thrown TypeError: null is not a regular expression object }

\end{DoxyCode}
 