Function: anyConcur()
Returns a promise that resolves to true
if fn
returns a truthy value or a
promise that resolves to a truthy value for any value of concurIterable
.
Otherwise returns a promise that resolves to false
.
Like Array.prototype.some
, but for concur iterables.
Example
console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
anyConcur(string => string.length > 8),
),
)
//=> true
anyConcur(fn)
anyConcur<
Value
>(fn
): (concurIterable
) =>Promise
<boolean
>
Returns a promise that resolves to true
if fn
returns a truthy value or a
promise that resolves to a truthy value for any value of concurIterable
.
Otherwise returns a promise that resolves to false
.
Like Array.prototype.some
, but for concur iterables.
Type Parameters
• Value
Parameters
• fn
Returns
Function
Parameters
• concurIterable: ConcurIterable
<Value
>
Returns
Promise
<boolean
>
Example
console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
anyConcur(string => string.length > 8),
),
)
//=> true
Defined in
anyConcur(fn, concurIterable)
anyConcur<
Value
>(fn
,concurIterable
):Promise
<boolean
>
Returns a promise that resolves to true
if fn
returns a truthy value or a
promise that resolves to a truthy value for any value of concurIterable
.
Otherwise returns a promise that resolves to false
.
Like Array.prototype.some
, but for concur iterables.
Type Parameters
• Value
Parameters
• fn
• concurIterable: ConcurIterable
<Value
>
Returns
Promise
<boolean
>
Example
console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
anyConcur(string => string.length > 8),
),
)
//=> true