您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021
  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. Promise.any = function (promises) {
  13. return any(promises);
  14. };
  15. Promise.prototype.any = function () {
  16. return any(this);
  17. };
  18. };