Source

func/flip.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Reverse the order of arguments
 * Reference: https://1loc.dev/#flip-the-arguments-of-a-function
 * @category func
 * @module flip
 */
function flip(fn) {
    return function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        return fn.apply(void 0, args.reverse());
    };
}
exports.default = flip;