"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/bluebird/js/main/any.js" (7 Feb 2017, 421 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 "use strict";
    2 module.exports = function(Promise) {
    3 var SomePromiseArray = Promise._SomePromiseArray;
    4 function any(promises) {
    5     var ret = new SomePromiseArray(promises);
    6     var promise = ret.promise();
    7     ret.setHowMany(1);
    8     ret.setUnwrap();
    9     ret.init();
   10     return promise;
   11 }
   12 
   13 Promise.any = function (promises) {
   14     return any(promises);
   15 };
   16 
   17 Promise.prototype.any = function () {
   18     return any(this);
   19 };
   20 
   21 };