isMulti
util to check if a hook is a multi hook:
- find: true
- get: false
- create:
context.datais an array - update: false
- patch:
context.id == null - remove:
context.id == null
ts
import { isMulti } from 'feathers-utils/predicates';Type declaration
ts
/**
* util to check if a hook is a multi hook:
* - find: true
* - get: false
* - create: `context.data` is an array
* - update: false
* - patch: `context.id == null`
* - remove: `context.id == null`
*
* @see https://utils.feathersjs.com/predicates/is-multi.html
*/
export declare const isMulti: <H extends HookContext = HookContext>(
context: H,
) => boolean| Argument | Type | Description |
|---|---|---|
| context | H |
