Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "middleware"

Index

Functions

aliases

  • Extends all aliases for present objects on to the result object.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

checkDemandDeny

coerce

  • Coerces value to a type.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

demand

  • Checks if result is missing a demanded argument.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

deny

  • Checks if result includes a denied or excluded argument.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

extend

  • Load config from file or static value.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

minmax

required

  • Checks if arg/option is required but missing.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

validator

  • Runs validation against coerced value.

    Parameters

    • val: any

      the current value.

    • key: string

      the current key.

    • event: IKawkahMiddlewareEventOption

      object of event context objects (result, source, option keys etc..).

    • context: KawkahCore

      the core context.

    Returns any

Object literals

Const defaultMiddleware

defaultMiddleware: object

BeforeAction

BeforeAction: object

Type declaration

AfterParsed

AfterParsed: object

minmax

minmax: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.AfterParsed

handler

handler: minmax = minmax

AfterValidate

AfterValidate: object

aliases

aliases: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.AfterValidate

handler

handler: aliases = aliases

BeforeValidate

BeforeValidate: object

coerce

coerce: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.BeforeValidate

handler

handler: coerce = coerce

extend

extend: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.BeforeValidate

handler

handler: extend = extend

Validate

Validate: object

demand

demand: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.Validate

handler

handler: demand = demand

deny

deny: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.Validate

handler

handler: deny = deny

required

required: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.Validate

handler

handler: required = required

validator

validator: object

group

group: KawkahMiddlewareGroup = KawkahMiddlewareGroup.Validate

handler

handler: validator = validator

Generated using TypeDoc