|
1 | | ---- |
2 | | -title: Utilities |
3 | | ---- |
| 1 | +<script setup> |
| 2 | +import HookTable from './components/HookTable.vue' |
| 3 | +</script> |
4 | 4 |
|
5 | 5 | # Utilities |
6 | 6 |
|
@@ -158,9 +158,7 @@ Restrict a hook to run for certain methods and method types. |
158 | 158 |
|
159 | 159 | Sequentially execute multiple sync or async hooks. |
160 | 160 |
|
161 | | -| before | after | methods | multi | details | |
162 | | -| ------ | ----- | ------- | ----- | -------------------------------------------------------------------------------------------------------- | |
163 | | -| yes | yes | all | n/a | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/combine.ts) | |
| 161 | +<HookTable :before="true" :after="true" :methods="['all']" multi="n/a" source="https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/combine.ts" /> |
164 | 162 |
|
165 | 163 | - **Arguments** |
166 | 164 | - `{Array< Function >} hookFuncs` |
@@ -199,9 +197,7 @@ module.exports = { before: { |
199 | 197 |
|
200 | 198 | Return the and of a series of sync or async predicate functions. |
201 | 199 |
|
202 | | -| before | after | methods | multi | details | |
203 | | -| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------ | |
204 | | -| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/every.ts) | |
| 200 | +<HookTable :before="true" :after="true" :methods="['all']" :multi="true" source="https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/every.ts" /> |
205 | 201 |
|
206 | 202 | - **Arguments** |
207 | 203 | - `{Array< Function >} predicates` |
@@ -283,9 +279,7 @@ Get the records in `context.data` or `context.result` |
283 | 279 |
|
284 | 280 | Negate a sync or async predicate function. |
285 | 281 |
|
286 | | -| before | after | methods | multi | details | |
287 | | -| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------- | |
288 | | -| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-not.ts) | |
| 282 | +<HookTable :before="true" :after="true" :methods="['all']" :multi="true" source="https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-not.ts" /> |
289 | 283 |
|
290 | 284 | - **Arguments** |
291 | 285 |
|
@@ -322,9 +316,7 @@ Negate a sync or async predicate function. |
322 | 316 |
|
323 | 317 | Check which transport provided the service call. |
324 | 318 |
|
325 | | -| before | after | methods | multi | details | |
326 | | -| ------ | ----- | ------- | ----- | ------------------------------------------------------------------------------------------------------------ | |
327 | | -| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-provider.ts) | |
| 319 | +<HookTable :before="true" :after="true" :methods="['all']" :multi="true" source="https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/is-provider.ts" /> |
328 | 320 |
|
329 | 321 | - **Arguments** |
330 | 322 | - `{Array< String >} transports` |
@@ -597,9 +589,7 @@ Let's you call a hook right after the service call. |
597 | 589 |
|
598 | 590 | Return the or of a series of sync or async predicate functions. |
599 | 591 |
|
600 | | -| before | after | methods | multi | details | |
601 | | -| ------ | ----- | ------- | ----- | ----------------------------------------------------------------------------------------------------- | |
602 | | -| yes | yes | all | yes | [source](https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/some.ts) | |
| 592 | +<HookTable :before="true" :after="true" :methods="['all']" :multi="true" source="https://github.com/feathersjs-ecosystem/feathers-hooks-common/blob/master/src/utils/some.ts" /> |
603 | 593 |
|
604 | 594 | - **Arguments** |
605 | 595 |
|
|
0 commit comments