Nexus File Manager
v2.0
π
Dashboard
β‘
System
π
βΊ
usr
βΊ
lib
βΊ
node_modules
βΊ
npm
βΊ
node_modules
βΊ
p-finally
Quick:
β¬οΈ Parent
π Root
π Home
π WWW
π Temp
βοΈ Etc
π€ Upload
π Create
β‘ WordPress Admin
π Refresh
βοΈ readme.md
β Back
# p-finally [](https://travis-ci.org/sindresorhus/p-finally) > [`Promise#finally()`](https://github.com/tc39/proposal-promise-finally) [ponyfill](https://ponyfill.com) - Invoked when the promise is settled regardless of outcome Useful for cleanup. ## Install ``` $ npm install --save p-finally ``` ## Usage ```js const pFinally = require('p-finally'); const dir = createTempDir(); pFinally(write(dir), () => cleanup(dir)); ``` ## API ### pFinally(promise, [onFinally]) Returns a `Promise`. #### onFinally Type: `Function` Note: Throwing or returning a rejected promise will reject `promise` with the rejection reason. ## Related - [p-try](https://github.com/sindresorhus/p-try) - `Promise#try()` ponyfill - Starts a promise chain - [Moreβ¦](https://github.com/sindresorhus/promise-fun) ## License MIT Β© [Sindre Sorhus](https://sindresorhus.com)
π»
System Info
Current path
/usr/lib/node_modules/npm/node_modules/p-finally
Contents
0 folders, 4 files
Disk free
100.50 GB
PHP version
8.3.30
π
Quick Actions
π Script location
π Web root
ποΈ Temp
π /usr/lib/node_modules/npm/node_modules/p-finally
β‘ Nexus File Manager β’ 4 items