This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/node_modules/promise/domains/finally.js
2025-01-13 09:33:52 +03:00

17 lines
345 B
JavaScript

'use strict';
var Promise = require('./core.js');
module.exports = Promise;
Promise.prototype.finally = function (f) {
return this.then(function (value) {
return Promise.resolve(f()).then(function () {
return value;
});
}, function (err) {
return Promise.resolve(f()).then(function () {
throw err;
});
});
};