@newdash/newdash
Version:
javascript/typescript utility library
20 lines (19 loc) • 776 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const setToString_1 = __importDefault(require("./setToString"));
const overRest_1 = __importDefault(require("./overRest"));
const flatten_1 = __importDefault(require("../flatten"));
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return (0, setToString_1.default)((0, overRest_1.default)(func, undefined, flatten_1.default), func + '');
}
exports.default = flatRest;