Options
All
  • Public
  • Public/Protected
  • All
Menu

klay

Index

Type aliases

ErrorCreator

ErrorCreator: function

Type declaration

    • (message: string): Error
    • Parameters

      • message: string

      Returns Error

ICoerceFunction

ICoerceFunction: function

IContextExtensionMethod

IContextExtensionMethod: function

Type declaration

IModelAppliesFunction

IModelAppliesFunction: function

Type declaration

IModelChildrenInput

IModelChildrenInput: IModelChildrenMap | IModel | IModelChild[]

IModelEnumOption

IModelEnumOption: string | number | IModel

IModelHook

IModelHook: function

Type declaration

    • Parameters

      Returns void

IModelHooks

IModelHooks: object

Type declaration

IModelMethod

IModelMethod: function

Type declaration

IModelValidationInput

IModelValidationInput: IValidationFunction | RegExp

IValidationFunction

IValidationFunction: function

Type declaration

Variables

Const ALL_FORMATS

ALL_FORMATS: "___ALL_FORMATS___" = "___ALL_FORMATS___"

Const FALLBACK_FORMAT

FALLBACK_FORMAT: "___FALLBACK_FORMAT___" = "___FALLBACK_FORMAT___"

Const KEYS

KEYS: string[] = ['value', 'conforms', 'errors', 'isFinished', 'rootValue', 'pathToValue']

Const PHASES

PHASES: string[] = values(ValidationPhase)

Const assertions

assertions: Assertions = new Assertions(msg => new ValidationError(msg))

Const defaultModelContext

defaultModelContext: IModelContext = ModelContext.create()

Const domain

domain: RegExp = /([0-9a-z-]+\.?)+(\.)?[0-9a-z-]+/i

Const hostname

hostname: RegExp = new RegExp(`(${domain.source}|${ip.source})`, 'i')

Const ip

ip: RegExp = /(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?/i

Const types

types: ModelType[] = [ModelType.String]

Functions

areDatesMoreThanTwoDaysApart

  • areDatesMoreThanTwoDaysApart(dateA: Date, dateB: Date): boolean

composeRegexes

  • composeRegexes(regexes: RegExp[]): RegExp

getDateFromNumber

  • getDateFromNumber(value: number): Date | number

getDateFromString

  • getDateFromString(value: string): Date | string

validateMinMax

Object literals

Const coerce

coerce: object

__computed

__computed: object

__computed

__computed: object

__computed

Const formats

formats: object

__computed

__computed: string[] = values(StringFormat)

Const validations

validations: object

__computed

__computed: object

__computed

__computed: RegExp[] = [composeRegexes([/^[a-z0-9+.-]+:(\/\/)?/, // scheme/(\S+@)?/, // userinfohostname, // hostname/(:\d+)?/,]),]

Generated using TypeDoc