\begin{quote}
Clean up error stack traces \end{quote}
Removes the mostly unhelpful internal Node.\+js entries.

Also works in Electron.\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5171}{}\doxysection{Install}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5171}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install clean-\/stack }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const cleanStack = require('clean-\/stack');}
\DoxyCodeLine{}
\DoxyCodeLine{const error = new Error('Missing unicorn');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(error.stack);}
\DoxyCodeLine{/*}
\DoxyCodeLine{Error: Missing unicorn}
\DoxyCodeLine{    at Object.<anonymous> (/Users/sindresorhus/dev/clean-\/stack/unicorn.js:2:15)}
\DoxyCodeLine{    at Module.\_compile (module.js:409:26)}
\DoxyCodeLine{    at Object.Module.\_extensions..js (module.js:416:10)}
\DoxyCodeLine{    at Module.load (module.js:343:32)}
\DoxyCodeLine{    at Function.Module.\_load (module.js:300:12)}
\DoxyCodeLine{    at Function.Module.runMain (module.js:441:10)}
\DoxyCodeLine{    at startup (node.js:139:18)}
\DoxyCodeLine{*/}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(cleanStack(error.stack));}
\DoxyCodeLine{/*}
\DoxyCodeLine{Error: Missing unicorn}
\DoxyCodeLine{    at Object.<anonymous> (/Users/sindresorhus/dev/clean-\/stack/unicorn.js:2:15)}
\DoxyCodeLine{*/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5173}{}\doxysection{API}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5173}
\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5174}{}\doxysubsection{clean\+Stack(stack, \mbox{[}options\mbox{]})}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5174}
\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5175}{}\doxysubsubsection{stack}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5175}
Type\+: {\ttfamily string}

The {\ttfamily stack} property of an {\ttfamily Error}.\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5176}{}\doxysubsubsection{options}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5176}
Type\+: {\ttfamily Object}\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5177}{}\doxyparagraph{pretty}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5177}
Type\+: {\ttfamily boolean}~\newline
 Default\+: {\ttfamily false}

Prettify the file paths in the stack\+:

{\ttfamily /\+Users/sindresorhus/dev/clean-\/stack/unicorn.js\+:2\+:15} → {\ttfamily $\sim$/dev/clean-\/stack/unicorn.js\+:2\+:15}\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5178}{}\doxysection{Related}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5178}

\begin{DoxyItemize}
\item \href{https://github.com/sindresorhus/extract-stack}{\texttt{ extrack-\/stack}} -\/ Extract the actual stack of an error
\item \href{https://github.com/tapjs/stack-utils}{\texttt{ stack-\/utils}} -\/ Captures and cleans stack traces
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_clean_stack_readme_autotoc_md5179}{}\doxysection{License}\label{md_sfcode_node_modules_clean_stack_readme_autotoc_md5179}
MIT © \href{https://sindresorhus.com}{\texttt{ Sindre Sorhus}} 