Skip to content

isContext

Source Code | Documentation

Check if the context matches the given options.

ts
  import { 
isContext
} from 'feathers-utils/predicates';

Type declaration

ts
export type IsContextOptions = {
  path?: MaybeArray<string>
  type?: MaybeArray<HookType>
  method?: MaybeArray<MethodName>
}
/**
 * Check if the context matches the given options.
 *
 * @see https://utils.feathersjs.com/predicates/is-context.html
 */
export declare const isContext: (
  options: IsContextOptions,
) => (context: any) => boolean
ArgumentTypeDescription
optionsIsContextOptions

Released under the MIT License.