UNPKG

promise-finally

Version:

Simple wrapper to run promise "finally" logic

7 lines 341 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function promiseFinally(value, cb) { return Promise.resolve(value).then(value => Promise.resolve(cb()).then(() => value), reason => Promise.resolve(cb()).then(() => Promise.reject(reason))); } exports.default = promiseFinally; //# sourceMappingURL=index.js.map