UNPKG

@arrows/array

Version:
19 lines (18 loc) 569 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.concat = void 0; const curry_1 = require("@arrows/composition/curry"); const _concat = (value, arr) => arr.concat(value); /** * Functional wrapper for Array.prototype.concat * * Combines two arrays. * If the concatenated value is not an array, adds it as a last element. * * @param value An array or single value to be concatenated * @param arr Initial array * @returns New array */ const concat = curry_1.default(_concat); exports.concat = concat; exports.default = concat;