function.jul SCRIPT

Provides helper functions for function objects.

All Definitions


TypeNameSignature
functionbindThisFunction bindThis(Function, var)
functionbindArgsFunction bindArgs(Any[])

Functions


Function bindThis(Function func, var thisVal)

Bind this to the given value.

Parameters

  • func

  • thisVal The new value to be used when resolving this keyword inside the given function.

Returns

  • The function to which a new this value has been bound;

Function bindArgs(var[] args)

Bind the first few arguments to the given values. The this variable remains unchanged.

Parameters

  • args The new values to bind to the first few arguemnts of the given function.

Returns

  • The function of which the first few arguments have been bound to the given values;