@newdash/newdash
Version:
javascript/typescript utility library
35 lines (34 loc) • 920 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.over = void 0;
const arrayMap_1 = __importDefault(require("./.internal/arrayMap"));
const createOver_1 = require("./.internal/createOver");
/**
* @ignore
*/
const internalOver = (0, createOver_1.createOver)(arrayMap_1.default);
/**
* Creates a function that invokes `iteratees` with the arguments it receives
* and returns their results.
*
* @since 5.11.0
* @category Util
* @param iteratees The iteratees to invoke.
* @returns Returns the new function.
* @example
*
* ```js
* const func = over([Math.max, Math.min])
*
* func(1, 2, 3, 4)
* // => [4, 1]
* ```
*/
function over(...iteratees) {
return internalOver(...iteratees);
}
exports.over = over;
exports.default = over;