From f237b9665e594c50a6fdd2ed3c26ef8a919796cc Mon Sep 17 00:00:00 2001 From: Joram van den Boezem Date: Sat, 5 Jun 2021 00:02:52 +0200 Subject: [PATCH] fix(README): name the right things when explaining the usage examples (#97) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 953ed41..1439db3 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ 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`. @@ -70,10 +70,10 @@ 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):