@arrows/array
Version:
Functional tools for JS arrays
17 lines (16 loc) • 501 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.has_ = void 0;
const curry_1 = require("@arrows/composition/curry");
const _has_ = (index, arr) => index < arr.length;
/**
* Determines whether an array has a certain index,
* returning true or false as appropriate.
*
* @param index Specific index
* @param arr Initial array
* @returns True if index exists, false otherwise
*/
const has_ = curry_1.default(_has_);
exports.has_ = has_;
exports.default = has_;
;