Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "functions"

Index

Functions

curry

  • curry<T1, TResult>(fn: function, n?: undefined | number): CurriedFunction1<T1, TResult>
  • curry<T1, T2, TResult>(fn: function, n?: undefined | number): CurriedFunction2<T1, T2, TResult>
  • curry<T1, T2, T3, TResult>(fn: function, n?: undefined | number): CurriedFunction3<T1, T2, T3, TResult>
  • Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.

    Type parameters

    • T1

    • TResult

    Parameters

    • fn: function
        • (a: T1): TResult
        • Parameters

          • a: T1

          Returns TResult

    • Optional n: undefined | number

    Returns CurriedFunction1<T1, TResult>

  • Type parameters

    • T1

    • T2

    • TResult

    Parameters

    • fn: function
        • (a: T1, b: T2): TResult
        • Parameters

          • a: T1
          • b: T2

          Returns TResult

    • Optional n: undefined | number

    Returns CurriedFunction2<T1, T2, TResult>

  • Type parameters

    • T1

    • T2

    • T3

    • TResult

    Parameters

    • fn: function
        • (a: T1, b: T2, c: T3): TResult
        • Parameters

          • a: T1
          • b: T2
          • c: T3

          Returns TResult

    • Optional n: undefined | number

    Returns CurriedFunction3<T1, T2, T3, TResult>

debounce

  • debounce<T>(func: T, wait: number, immediate?: boolean): T
  • Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked. The func is invoked with the last arguments provided to the debounced function.

    Type parameters

    • T: Function

    Parameters

    • func: T
    • wait: number
    • Default value immediate: boolean = false

      indicate whether func should be invoked on the leading and/or trailing edge of the wait timeout.

    Returns T

delayed

  • delayed<T>(this: any, schedulerFn: function, fn: T): T
  • Creates a delayed function that delays invoking func until called by schedulerFn. The func is invoked with the last arguments provided to the delayed function.

    Type parameters

    • T: Function

    Parameters

    • this: any
    • schedulerFn: function
        • (fn: Function): void
        • Parameters

          • fn: Function

          Returns void

    • fn: T

    Returns T

identity

  • identity<T>(i: T): T
  • Function for identity enumeration. Returns what passed to it

    Type parameters

    • T

    Parameters

    • i: T

    Returns T

memoize

  • memoize<T>(this: any, func: T): T
  • Creates a function that memoizes the result of func. The func is invoked with the this binding of the memoized function.

    Type parameters

    • T: Function

    Parameters

    • this: any
    • func: T

    Returns T

noop

  • noop(): void

once

  • once<T>(func: T): T
  • Creates a function that is restricted to invoking func once. Repeat calls to the function return the value of the first invocation. The func is invoked with the this binding and arguments of the created function.

    Type parameters

    • T: Function

    Parameters

    • func: T

    Returns T

Generated using TypeDoc