mirror of
https://github.com/flynx/stoppable.js.git
synced 2025-10-28 18:30:09 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3afd4a01bc
commit
cf15e7c628
@ -56,7 +56,7 @@ stoppable(<async-generator>)
|
|||||||
|
|
||||||
### `stoppable.STOP / stoppable.STOP(..)`
|
### `stoppable.STOP / stoppable.STOP(..)`
|
||||||
|
|
||||||
A special object/constructor that can be either returned/thrown _as-is_ or
|
A special object/constructor that can either be returned/thrown _as-is_ or
|
||||||
used to create an _instance_ to be returned thrown.
|
used to create an _instance_ to be returned thrown.
|
||||||
|
|
||||||
```bnf
|
```bnf
|
||||||
@ -67,8 +67,9 @@ stoppable.STOP(<value>)
|
|||||||
-> <stop-object>
|
-> <stop-object>
|
||||||
```
|
```
|
||||||
|
|
||||||
This will get intercepted by `stoppable(..)` and appropriately handled merging
|
This will get intercepted by `stoppable(..)` and appropriately handled, stopping
|
||||||
it into the return/yield value and stopping the function/iterator.
|
the function iterator and merging the value into the yields of a generator or
|
||||||
|
returning it from a function depending on the wrapper type.
|
||||||
|
|
||||||
`<stop-object>` can contain a value that will get handled by `stoppable(..)` (default: `undefined`).
|
`<stop-object>` can contain a value that will get handled by `stoppable(..)` (default: `undefined`).
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user