Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-06-11 11:36:13 +03:00
parent 22d9aad56e
commit 3a4653f261
2 changed files with 19 additions and 2 deletions

View File

@ -173,12 +173,17 @@ object.Constructor('IterablePromise', Promise, {
// is called not in the order of the elements but rather in order
// of promise resolution...
// NOTE: index of items is unknowable because items can expand and
// contract depending on handlrs (e.g. .filter(..) can remove
// contract depending on handlers (e.g. .filter(..) can remove
// items)...
// Thus the following can not be implemented here:
// .splice(..) - can't both modify and return
// a result...
// [Symbol.iterator]() - needs to be sync...
// .pop() / .shift() - can't modify the promise, use
// .first() / .last() instead.
// [Symbol.iterator]() - needs to be sync and we can't
// know the number of elements to
// return promises before the whole
// iterable promise is resolved.
// These are direct poxies requiring the whole promuse to
// resolve:
// .at(..) / .first() / .last()

View File

@ -77,6 +77,8 @@ Library of JavaScript type extensions, types and utilities.
- [`<promise-iter>.reverse()`](#promise-iterreverse)
- [`<promise-iter>.concat(..)`](#promise-iterconcat)
- [`<promise-iter>.push(..)` / `<promise-iter>.unshift(..)`](#promise-iterpush--promise-iterunshift)
- [`<promise-iter>.at(..)` / `<promise-iter>.first()` / `<promise-iter>.last()`](#promise-iterat--promise-iterfirst--promise-iterlast)
- [Array proxy methods](#array-proxy-methods)
- [`<promise-iter>.then(..)` / `<promise-iter>.catch(..)` / `<promise-iter>.finally(..)`](#promise-iterthen--promise-itercatch--promise-iterfinally)
- [Advanced handler](#advanced-handler)
- [Promise proxies](#promise-proxies)
@ -1663,6 +1665,16 @@ and [`<array>.unshift(..)`](https://developer.mozilla.org/en-US/docs/Web/JavaScr
see them for more info.
#### `<promise-iter>.at(..)` / `<promise-iter>.first()` / `<promise-iter>.last()`
XXX
#### Array proxy methods
XXX
#### `<promise-iter>.then(..)` / `<promise-iter>.catch(..)` / `<promise-iter>.finally(..)`
An extension to