\begin{quote}
\href{https://github.com/tc39/proposal-promise-finally}{\texttt{ {\ttfamily Promise\#finally()}}} \href{https://ponyfill.com}{\texttt{ ponyfill}} -\/ Invoked when the promise is settled regardless of outcome \end{quote}
Useful for cleanup.\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19272}{}\doxysection{Install}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19272}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save p-\/finally }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const pFinally = require('p-\/finally');}
\DoxyCodeLine{}
\DoxyCodeLine{const dir = createTempDir();}
\DoxyCodeLine{}
\DoxyCodeLine{pFinally(write(dir), () => cleanup(dir)); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19274}{}\doxysection{API}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19274}
\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19275}{}\doxysubsection{p\+Finally(promise, \mbox{[}on\+Finally\mbox{]})}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19275}
Returns a {\ttfamily Promise}.\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19276}{}\doxysubsubsection{on\+Finally}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19276}
Type\+: {\ttfamily Function}

Note\+: Throwing or returning a rejected promise will reject {\ttfamily promise} with the rejection reason.\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19277}{}\doxysection{Related}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19277}

\begin{DoxyItemize}
\item \href{https://github.com/sindresorhus/p-try}{\texttt{ p-\/try}} -\/ {\ttfamily Promise\#try()} ponyfill -\/ Starts a promise chain
\item \href{https://github.com/sindresorhus/promise-fun}{\texttt{ More…}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_p_finally_readme_autotoc_md19278}{}\doxysection{License}\label{md_sfcode_node_modules_p_finally_readme_autotoc_md19278}
MIT © \href{https://sindresorhus.com}{\texttt{ Sindre Sorhus}} 