Skip to main content

Function: asConcur()

asConcur<Value>(iterable): ConcurIterable<Value>

Returns a concur iterable wrapper around iterable.

Type Parameters

Value

Parameters

iterable

Iterable<Value, any, any> | AsyncIterable<Value, any, any> | ConcurIterable<Value>

Returns

ConcurIterable<Value>

Example

import { asConcur, forEachConcur } from 'lfi'

const concurIterable = asConcur([`sloth`, `lazy`, `sleep`])

await forEachConcur(console.log, concurIterable)
//=> sloth
//=> lazy
//=> sleep
Playground

Since

v0.0.2

Defined in

core.d.ts:342