update documentation

This commit is contained in:
otrepanier 2020-11-20 15:11:41 -08:00
parent 4fc7792c0c
commit 9d554f236a

View file

@ -356,6 +356,29 @@ docs:
returns: Promise<number> returns: Promise<number>
static: true static: true
- name: fold
since: unreleased
desc: |
Folds an array into a promise or a value. The array is traversed sequentially and
The reducer function can return a promise or directly a value. It always received the last resolved value.
The folding will stop at the first rejection encountered.
```
params:
- name: list
type: "array<T>"
- name: reducer
desc: The function to call with the accumulated value, the current element from the array and its index.
type:
kind: function
params: "accumulator: U, value: T, index: number"
returns: U | Promise<U>
- name: initialValue
type: "U"
returns: U | Promise<U>
static: true
- name: each - name: each
since: 3.0.0 since: 3.0.0
desc: | desc: |