|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
421 bytes
|
| Line | |
|---|
| 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 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.