mirror of
https://github.com/flynx/stoppable.js.git
synced 2025-10-28 10:20:10 +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(..)`
|
||||
|
||||
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.
|
||||
|
||||
```bnf
|
||||
@ -67,8 +67,9 @@ stoppable.STOP(<value>)
|
||||
-> <stop-object>
|
||||
```
|
||||
|
||||
This will get intercepted by `stoppable(..)` and appropriately handled merging
|
||||
it into the return/yield value and stopping the function/iterator.
|
||||
This will get intercepted by `stoppable(..)` and appropriately handled, stopping
|
||||
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`).
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user