Skip to content

unless

Source Code | Documentation

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
ArgumentTypeDescription
predicateboolean | PredicateFn
hooksHookFunction<H>[]
typemethodsmulti
before, afterallyes

Released under the MIT License.