mirror of
https://github.com/abrendan/MicDropMessages.git
synced 2025-08-25 22:12:02 +02:00
Initial commit
This commit is contained in:
16
node_modules/promise/setimmediate/finally.js
generated
vendored
Normal file
16
node_modules/promise/setimmediate/finally.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'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;
|
||||
});
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user