starry.bound
v4.0.0
Published
Member of the starry suite—modular functions for iterable objects.
Downloads
7
Maintainers
Readme
Member of the starry suite—modular functions for iterable objects.
Status
Applies to the whole suite.
Usage
function bound<TObject = any, TArgs = any, TOut = any>(
fn: (object: TObject, ...args: TArgs[]) => TOut
): (this: TObject, ...args: TArgs[]) => TOut
Returns a function that calls the input function with the first argument being the output function's context.
Parameters:
- fn:
(object: TObject, ...args: TArgs[]) => TOut
Returns: (this: TObject, ...args: TArgs[]) => TOut