@arrows/array
Version:
Functional tools for JS arrays
13 lines (12 loc) • 337 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.butLast_ = void 0;
/**
* Creates a new array from the initial one, without the last element.
*
* @param arr Initial array
* @returns New array
*/
const butLast_ = (arr) => arr.slice(0, -1);
exports.butLast_ = butLast_;
exports.default = butLast_;
;