The Wayback Machine - https://web.archive.org/web/20170626181851/https://github.com/lodash/lodash/blob/master/overSome.js
Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (29 sloc) 640 Bytes
import some from './some.js'
/**
* Creates a function that checks if **any** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* @since 4.0.0
* @category Util
* @param {Function[]} [predicates=[identity]]
* The predicates to check.
* @returns {Function} Returns the new function.
* @example
*
* const func = overSome([Boolean, isFinite])
*
* func('1')
* // => true
*
* func(null)
* // => true
*
* func(NaN)
* // => false
*/
function overSome(iteratees) {
return function(...args) {
return some(iteratees, (iteratee) => iteratee.apply(this, args))
}
}
export default overSome
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.