Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • FnHelper

Index

Constructors

constructor

Methods

Static debounce

  • debounce(func: Function, wait: number, immediate?: boolean): Function
  • Returns a function, that, as long as it continues to be invoked, will not be triggered.
    The function will be called after it stops being called for wait milliseconds.
    If immediate is passed, trigger the function on the leading edge, instead of the trailing.

    Taken from David Walsh's blog (who took it from underscore.js):
    https://davidwalsh.name/javascript-debounce-function

    Parameters

    • func: Function
    • wait: number
    • Optional immediate: boolean

    Returns Function

Static deferAfterEvent

  • deferAfterEvent(eventSrc: ExtComponent, event: string, method: Function, args?: any[], methodScope?: any): void
  • Defers the execution of the given method until the given event has been fired

    Parameters

    • eventSrc: ExtComponent

      The source which fires the event for which we are waiting for

    • event: string

      Name of the event for which we listen to

    • method: Function

      The method which should be executed after the event has been fired

    • Optional args: any[]

      Arguments which should be passed to the method

    • Optional methodScope: any

      The scope in which the method should be called.
      The eventSrc if not given.

    Returns void

Static interceptFnAfter

  • interceptFnAfter(object: object, methodName: string, fn: Function, scope?: object): void
  • Basically the same as Ext.Function.interceptAfter with one difference:
    The Ext function returns the return value of the intercepter instead of the one from the original function

    Parameters

    • object: object
    • methodName: string
    • fn: Function
    • Optional scope: object

    Returns void

Static interceptFnBefore

  • interceptFnBefore(object: object, methodName: string, fn: Function, scope?: object): void
  • Basically the same as Ext.Function.interceptBefore with one difference:
    The Ext function returns the return value of the intercepter instead of the one from the original function

    Parameters

    • object: object
    • methodName: string
    • fn: Function
    • Optional scope: object

    Returns void

Static throttle

  • throttle(func: Function, wait: number): Function
  • Returns a function, that will be delayed if it has already been called previously within a certain time.
    Therefore it can be used to reduce the amount of function according to the time grid, defined by the wait parameter.

    Parameters

    • func: Function
    • wait: number

    Returns Function

Generated using TypeDoc