@arrows/array
Version:
Functional tools for JS arrays
19 lines (18 loc) • 573 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.some = void 0;
const curry_1 = require("@arrows/composition/curry");
const _some = (testFn, arr) => arr.some(testFn);
/**
* Functional wrapper for Array.prototype.some
*
* Determines whether the specified test function
* returns true for any element of an array.
*
* @param testFn Test function
* @param arr Initial array
* @returns True if any element satisfies test function, false otherwise
*/
const some = curry_1.default(_some);
exports.some = some;
exports.default = some;
;