unless
See also: iff iffElse predicates
Execute a series of hooks if a sync or async predicate is falsy.
ts
import { unless } from 'feathers-utils/hooks';Type declaration
ts
/**
* Execute a series of hooks if a sync or async predicate is falsy.
*
* @see https://utils.feathersjs.com/hooks/unless.html
*/
export declare function unless<H extends HookContext = HookContext>(
predicate: boolean | PredicateFn,
...hooks: HookFunction<H>[]
): (this: any, ctx: HookContext) => any| Argument | Type | Description |
|---|---|---|
| predicate | boolean | PredicateFn | |
| hooks | HookFunction<H>[] |
| type | methods | multi |
|---|---|---|
| before, after | all | yes |
