time-to-botec/js/node_modules/@stdlib/utils/reorder-arguments/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

32 lines
597 B
Plaintext

{{alias}}( fcn, indices[, thisArg] )
Returns a function that invokes a provided function with reordered
arguments.
Parameters
----------
fcn: Function
Input function.
indices: Array<integer>
Argument indices.
thisArg: any (optional)
Function context.
Returns
-------
out: Function
Function with reordered arguments.
Examples
--------
> function foo( a, b, c ) { return [ a, b, c ]; };
> var bar = {{alias}}( foo, [ 2, 0, 1 ] );
> var out = bar( 1, 2, 3 )
[ 3, 1, 2 ]
See Also
--------