dotfiles/.vscode/extensions/dbankier.vscode-instant-markdown-0.1.0/node_modules/bluebird/js/release/any.js
Cyryl Płotnicki 280bcab25f VSCode update
2016-09-24 13:12:34 +02:00

21 lines
421 B
JavaScript

"use strict";
module.exports = function(Promise) {
var SomePromiseArray = Promise._SomePromiseArray;
function any(promises) {
var ret = new SomePromiseArray(promises);
var promise = ret.promise();
ret.setHowMany(1);
ret.setUnwrap();
ret.init();
return promise;
}
Promise.any = function (promises) {
return any(promises);
};
Promise.prototype.any = function () {
return any(this);
};
};