Home Reference Source

Function

Static Public Summary
public
public

debounce(func: Function, wait: Number, immediate: Boolean): *

Returns a function, that, as long as it continues to be invoked, will not be triggered.

public

debug(message: *, color: string)

public

error(args: ...*)

public

Method to track JS errors if your Google Analytics account.

public

info(args: ...*)

public

log(args: ...*)

public

Execute some polyfill for older and crappy browsers.

public

warn(args: ...*)

Static Public

public Request() source

public debounce(func: Function, wait: Number, immediate: Boolean): * source

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 N milliseconds. If immediate is passed, trigger the function on the leading edge, instead of the trailing.

Params:

NameTypeAttributeDescription
func Function

[function to debounce]

wait Number

[time to wait]

immediate Boolean

[]

Return:

*

See:

public debug(message: *, color: string) source

Params:

NameTypeAttributeDescription
message *
color string
  • optional
  • default:

public error(args: ...*) source

Params:

NameTypeAttributeDescription
args ...*

public gaTrackErrors() source

import gaTrackErrors from 'starting-blocks/src/utils/gaTrackErrors.js'

Method to track JS errors if your Google Analytics account.

public info(args: ...*) source

Params:

NameTypeAttributeDescription
args ...*

public log(args: ...*) source

Params:

NameTypeAttributeDescription
args ...*

public polyfills() source

Execute some polyfill for older and crappy browsers.

  • window.requestAnimFrame
  • window.cancelAnimFrame
  • Avoid console errors in browsers that lack a console.

public warn(args: ...*) source

Params:

NameTypeAttributeDescription
args ...*