Parsing the Java\+Script\textquotesingle{}s Reg\+Exp in Java\+Script.\hypertarget{md_sfcode_node_modules_regjsparser_README_autotoc_md24150}{}\doxysection{Installation}\label{md_sfcode_node_modules_regjsparser_README_autotoc_md24150}

\begin{DoxyCode}{0}
\DoxyCodeLine{npm install regjsparser }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regjsparser_README_autotoc_md24151}{}\doxysection{Usage}\label{md_sfcode_node_modules_regjsparser_README_autotoc_md24151}

\begin{DoxyCode}{0}
\DoxyCodeLine{var parse = require('regjsparser').parse;}
\DoxyCodeLine{}
\DoxyCodeLine{var parseTree = parse('\string^a'); // /\string^a/}
\DoxyCodeLine{console.log(parseTree);}
\DoxyCodeLine{}
\DoxyCodeLine{// Toggle on/off additional features:}
\DoxyCodeLine{var parseTree = parse('\string^a', '', \{}
\DoxyCodeLine{  // SEE: https://github.com/jviereck/regjsparser/pull/78}
\DoxyCodeLine{  unicodePropertyEscape: true,}
\DoxyCodeLine{}
\DoxyCodeLine{  // SEE: https://github.com/jviereck/regjsparser/pull/83}
\DoxyCodeLine{  namedGroups: true,}
\DoxyCodeLine{}
\DoxyCodeLine{  // SEE: https://github.com/jviereck/regjsparser/pull/89}
\DoxyCodeLine{  lookbehind: true}
\DoxyCodeLine{\});}
\DoxyCodeLine{console.log(parseTree); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_regjsparser_README_autotoc_md24152}{}\doxysection{Testing}\label{md_sfcode_node_modules_regjsparser_README_autotoc_md24152}
To run the tests, run the following command\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm test }

\end{DoxyCode}


To create a new reference file, execute…


\begin{DoxyCode}{0}
\DoxyCodeLine{node test/update-\/fixtures.js }

\end{DoxyCode}


…from the repo top directory. 