\#is-\/regex \textsuperscript{\href{https://npmjs.org/package/is-regex}{\texttt{ }}}

\href{https://travis-ci.org/ljharb/is-regex}{\texttt{ }} \href{https://david-dm.org/ljharb/is-regex}{\texttt{ }} \href{https://david-dm.org/ljharb/is-regex\#info=devDependencies}{\texttt{ }} \mbox{[}\mbox{]}\mbox{[}license-\/url\mbox{]} \href{http://npm-stat.com/charts.html?package=is-regex}{\texttt{ }}

\href{https://npmjs.org/package/is-regex}{\texttt{ }}

\href{https://ci.testling.com/ljharb/is-regex}{\texttt{ }}

Is this value a JS regex? This module works cross-\/realm/iframe, and despite ES6 @to\+String\+Tag.\hypertarget{md_sfcode_node_modules_is_regex_README_autotoc_md13211}{}\doxysubsection{Example}\label{md_sfcode_node_modules_is_regex_README_autotoc_md13211}

\begin{DoxyCode}{0}
\DoxyCodeLine{var isRegex = require('is-\/regex');}
\DoxyCodeLine{var assert = require('assert');}
\DoxyCodeLine{}
\DoxyCodeLine{assert.notOk(isRegex(undefined));}
\DoxyCodeLine{assert.notOk(isRegex(null));}
\DoxyCodeLine{assert.notOk(isRegex(false));}
\DoxyCodeLine{assert.notOk(isRegex(true));}
\DoxyCodeLine{assert.notOk(isRegex(42));}
\DoxyCodeLine{assert.notOk(isRegex('foo'));}
\DoxyCodeLine{assert.notOk(isRegex(function () \{\}));}
\DoxyCodeLine{assert.notOk(isRegex([]));}
\DoxyCodeLine{assert.notOk(isRegex(\{\}));}
\DoxyCodeLine{}
\DoxyCodeLine{assert.ok(isRegex(/a/g));}
\DoxyCodeLine{assert.ok(isRegex(new RegExp('a', 'g'))); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_is_regex_README_autotoc_md13212}{}\doxysubsection{Tests}\label{md_sfcode_node_modules_is_regex_README_autotoc_md13212}
Simply clone the repo, {\ttfamily npm install}, and run {\ttfamily npm test} 