mirror of
https://github.com/flynx/walk.js.git
synced 2025-10-29 11:00:13 +00:00
more tweaking docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9d0deba153
commit
6f6d316be4
@ -12,7 +12,7 @@ An extensible tree walk(..) framework...
|
|||||||
- [API](#api)
|
- [API](#api)
|
||||||
- [`walk(..)`](#walk)
|
- [`walk(..)`](#walk)
|
||||||
- [`getter(..)`](#getter)
|
- [`getter(..)`](#getter)
|
||||||
- [`done(..)` (optional)](#done-optional)
|
- [`done(..)`](#done)
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
|
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ Stop walking and return `state`. The passed `state` is directly returned from th
|
|||||||
*Note that `stop(..)` behaves in a similar manner to `return`, i.e. execution is aborted immidiately.*
|
*Note that `stop(..)` behaves in a similar manner to `return`, i.e. execution is aborted immidiately.*
|
||||||
|
|
||||||
|
|
||||||
### `done(..)` (optional)
|
### `done(..)`
|
||||||
|
|
||||||
`done(state) -> state`
|
`done(state) -> state`
|
||||||
User provided function, if given, is called by the *walker* after walking is done (no more nodes to handle). `state` is passed as argument and the return value is returned from the *walker*. This is run in the same context (`this`) as `getter(..)`.
|
User provided function, if given, is called by the *walker* after walking is done (no more nodes to handle). `state` is passed as argument and the return value is returned from the *walker*. This is run in the same context (`this`) as `getter(..)`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user