Skip to content

Commit

Permalink
fix(README): name the right things when explaining the usage examples (
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar authored Jun 4, 2021
1 parent b4633f7 commit f237b96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ The methods are executed in the following order
1. `beforeHook`
2. `fetchFromDatabase`
3. `afterHook`
4. `getData`
4. `handleData`

`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`.

If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is
called next.

If `afterHook` throws an error then `handleGetError` is called instead
of `getData`.
of `handleData`.

If `errorHook` throws an error then `handleGetError` is called next, otherwise
`afterHook` and `getData`.
`afterHook` and `handleData`.

You can also use `hook.wrap` to achieve the same thing as shown above (collection example):

This comment has been minimized.

Copy link
@NikkieDickie

NikkieDickie Nov 2, 2021

Lol


Expand Down

0 comments on commit f237b96

Please sign in to comment.