jpsp91 07dd8af64f root page set | 6 lat temu | |
---|---|---|
.. | ||
index.js | 6 lat temu | |
license | 6 lat temu | |
package.json | 6 lat temu | |
readme.md | 6 lat temu |
Promise#finally()
ponyfill - Invoked when the promise is settled regardless of outcome
Useful for cleanup.
$ npm install --save p-finally
const pFinally = require('p-finally');
const dir = createTempDir();
pFinally(write(dir), () => cleanup(dir));
Returns a Promise
.
Type: Function
Note: Throwing or returning a rejected promise will reject promise
with the rejection reason.
MIT © Sindre Sorhus