\href{https://npmjs.org/package/toidentifier}{\texttt{ }} \href{https://npmjs.org/package/toidentifier}{\texttt{ }} \href{https://travis-ci.org/component/toidentifier}{\texttt{ }} \href{https://codecov.io/gh/component/toidentifier}{\texttt{ }}

\begin{quote}
Convert a string of words to a Java\+Script identifier \end{quote}
\hypertarget{md_sfcode_node_modules_toidentifier_README_autotoc_md30547}{}\doxysection{Install}\label{md_sfcode_node_modules_toidentifier_README_autotoc_md30547}
This is a \href{https://nodejs.org/en/}{\texttt{ Node.\+js}} module available through the \href{https://www.npmjs.com/}{\texttt{ npm registry}}. Installation is done using the \href{https://docs.npmjs.com/getting-started/installing-npm-packages-locally}{\texttt{ {\ttfamily npm install} command}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install toidentifier }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_toidentifier_README_autotoc_md30548}{}\doxysection{Example}\label{md_sfcode_node_modules_toidentifier_README_autotoc_md30548}

\begin{DoxyCode}{0}
\DoxyCodeLine{var toIdentifier = require('toidentifier')}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(toIdentifier('Bad Request'))}
\DoxyCodeLine{// => "{}BadRequest"{} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_toidentifier_README_autotoc_md30549}{}\doxysection{API}\label{md_sfcode_node_modules_toidentifier_README_autotoc_md30549}
This Common\+JS module exports a single default function\+: {\ttfamily to\+Identifier}.\hypertarget{md_sfcode_node_modules_toidentifier_README_autotoc_md30550}{}\doxysubsection{to\+Identifier(string)}\label{md_sfcode_node_modules_toidentifier_README_autotoc_md30550}
Given a string as the argument, it will be transformed according to the following rules and the new string will be returned\+:


\begin{DoxyEnumerate}
\item Split into words separated by space characters ({\ttfamily 0x20}).
\item Upper case the first character of each word.
\item Join the words together with no separator.
\item Remove all non-\/word ({\ttfamily \mbox{[}0-\/9a-\/z\+\_\+\mbox{]}}) characters.
\end{DoxyEnumerate}\hypertarget{md_sfcode_node_modules_toidentifier_README_autotoc_md30551}{}\doxysection{License}\label{md_sfcode_node_modules_toidentifier_README_autotoc_md30551}
\mbox{[}MIT\mbox{]}(LICENSE)\hypertarget{README.md_autotoc_md30552}{}\doxysection{autotoc\+\_\+md30552}\label{README.md_autotoc_md30552}
