\href{https://travis-ci.org/electerious/nice-try}{\texttt{ }} \href{https://ci.appveyor.com/project/electerious/nice-try}{\texttt{ }} \href{https://coveralls.io/github/electerious/nice-try?branch=master}{\texttt{ }} \href{https://david-dm.org/electerious/nice-try\#info=dependencies}{\texttt{ }} \href{https://greenkeeper.io/}{\texttt{ }}

A function that tries to execute a function and discards any error that occurs.\hypertarget{md_sfcode_node_modules_nice_try_README_autotoc_md18044}{}\doxysection{Install}\label{md_sfcode_node_modules_nice_try_README_autotoc_md18044}

\begin{DoxyCode}{0}
\DoxyCodeLine{npm install nice-\/try }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const niceTry = require('nice-\/try')}
\DoxyCodeLine{}
\DoxyCodeLine{niceTry(() => JSON.parse('true')) // true}
\DoxyCodeLine{niceTry(() => JSON.parse('truee')) // undefined}
\DoxyCodeLine{niceTry() // undefined}
\DoxyCodeLine{niceTry(true) // undefined }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_nice_try_README_autotoc_md18046}{}\doxysection{API}\label{md_sfcode_node_modules_nice_try_README_autotoc_md18046}
\hypertarget{md_sfcode_node_modules_nice_try_README_autotoc_md18047}{}\doxysubsection{Parameters}\label{md_sfcode_node_modules_nice_try_README_autotoc_md18047}

\begin{DoxyItemize}
\item {\ttfamily fn} {\ttfamily \{Function\}} Function that might or might not throw an error.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_nice_try_README_autotoc_md18048}{}\doxysubsection{Returns}\label{md_sfcode_node_modules_nice_try_README_autotoc_md18048}

\begin{DoxyItemize}
\item {\ttfamily \{?$\ast$\}} Return-\/value of the function when no error occurred. 
\end{DoxyItemize}