Options
All
  • Public
  • Public/Protected
  • All
Menu

e2e4

Index

Variables

Let DefaultFilterConfig

DefaultFilterConfig: FilterConfig = {coerce: true,defaultValue: undefined,emptyIsNull: false,ignoreOnAutoMap: false,omitIfNullOrUndefined: false,parseFormatter: undefined,serializeFormatter: undefined} as FilterConfig

Object literal used by getDefaultFilterConfig function to build filter configuration. This object can be used to change default values of filter configs globally. By default it has next values:

{
       coerce: true,
       defaultValue: undefined,
       emptyIsNull: false,
       ignoreOnAutoMap: false,
       omitIfNullOrUndefined: false,
       parameterName: <value of 'propertyName' parameter>,
       parseFormatter: undefined,
       propertyName: <value of 'propertyName' parameter>,
       serializeFormatter: undefined
}

Functions

cloneAsLiteral

  • cloneAsLiteral(value: any): any
  • Copies values of all properties from passed object to the new object literal.

    If any of the properties of passed object is also a complex object then cloneAsLiteral will be called recursively.

    Function declarations are ignored.

    Parameters

    • value: any

      value to clone.

    Returns any

    resulted literal.

coerceValue

  • coerceValue(value: any): any
  • Coerce type of passed value.

    For example if you pass string with value 'null' it returns null, if you pass 'true' it returns boolean value true, if you pass '1.0' it returns number 1.0 etc.

    If passed value is complex object or array this method will be called for each property or array item.

    see

    coerceTypes

    Parameters

    • value: any

      value to coerce.

    Returns any

    resulted value.

destroyAll

  • destroyAll(collection: any[], async?: boolean): void
  • Cleaning up passed array by calling splice function.

    Next, each element of passed array will be checked for existence of destroy method and if it exists it will be called.

    Parameters

    • collection: any[]

      array of elements to destroy.

    • Default value async: boolean = true

      if true then iterating over array and destroy methods calling will be executed via setTimeout (,0).

    Returns void

filter

  • filter(targetOrNameOrConfig?: string | FilterConfig, key?: string): any

getDefaultFilterConfig

  • getDefaultFilterConfig(propertyName: string): FilterConfig

Object literals

Let coerceTypes

coerceTypes: object

Set of key-value pairs which is used by coerceValue method to coerce specific values.

false

false: boolean = !1

null

null: null = null

true

true: boolean = !0

Generated using TypeDoc