@arrows/array
Version:
Functional tools for JS arrays
18 lines (17 loc) • 537 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.join = void 0;
const curry_1 = require("@arrows/composition/curry");
const _join = (separator, arr) => arr.join(separator);
/**
* Functional wrapper for Array.prototype.join
*
* Adds all the elements of an array separated by the specified separator string.
*
* @param separator Separator
* @param arr Initial array
* @returns String of joined array elements.
*/
const join = curry_1.default(_join);
exports.join = join;
exports.default = join;
;