Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/reverse-arguments/docs/types/index.d"

Index

Functions

Functions

Export assignment reverseArguments

  • reverseArguments(fcn: Function, thisArg?: any): Function
  • Returns a function that invokes a provided function with arguments in reverse order.

    Parameters

    • fcn: Function

      input function

    • Optional thisArg: any

      function context

    Returns Function

    reverse arguments function

    Example

    function foo( a, b, c ) {
        return [ a, b, c ];
    }
    
    var bar = reverseArguments( foo );
    
    var out = bar( 1, 2, 3 );
    // returns [ 3, 2, 1 ]