@newdash/newdash
Version:
javascript/typescript utility library
38 lines (37 loc) • 873 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.overSome = void 0;
const createOver_1 = require("./.internal/createOver");
const arraySome_1 = require("./.internal/arraySome");
/**
* @ignore
*/
const internalOverSome = (0, createOver_1.createOver)(arraySome_1.arraySome);
/**
* Creates a function that checks if **any** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* @since 5.11.0
* @category Util
* @param predicates The predicates to check.
* @returns Returns the new function.
* @example
*
* ```js
* const func = overSome([Boolean, isFinite])
*
* func('1')
* // => true
*
* func(null)
* // => true
*
* func(NaN)
* // => false
* ```
*/
function overSome(...iteratees) {
return internalOverSome(...iteratees);
}
exports.overSome = overSome;
exports.default = overSome;