'use strict'; module.exports = (promise, onFinally) => { onFinally = onFinally || (() => {}); return promise.then( val => new Promise(resolve => { resolve(onFinally()); }).then(() => val), err => new Promise(resolve => { resolve(onFinally()); }).then(() => { throw err; }) ); };
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
index.js | File | 302 B | 0644 |
|
license | File | 1.09 KB | 0644 |
|
package.json | File | 1.64 KB | 0644 |
|
readme.md | File | 949 B | 0644 |
|