Skip to main content

Function: joinConcur()

Returns a promise that resolves to the result of concatenating the values of concurIterable to a string where values are separated by separator.

Like Array.prototype.join, but for concur iterables, but does not treat null, undefined, or [] specially.

Example

console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
joinConcur(`, `),
),
)
//=> sloth, more sloth, even more sloth

joinConcur(separator)

joinConcur(separator): (concurIterable) => Promise<string>

Returns a promise that resolves to the result of concatenating the values of concurIterable to a string where values are separated by separator.

Like Array.prototype.join, but for concur iterables, but does not treat null, undefined, or [] specially.

Parameters

separator: string

Returns

Function

Parameters

concurIterable: ConcurIterable<unknown>

Returns

Promise<string>

Example

console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
joinConcur(`, `),
),
)
//=> sloth, more sloth, even more sloth

Defined in

collections.d.ts:449

joinConcur(separator, concurIterable)

joinConcur(separator, concurIterable): Promise<string>

Returns a promise that resolves to the result of concatenating the values of concurIterable to a string where values are separated by separator.

Like Array.prototype.join, but for concur iterables, but does not treat null, undefined, or [] specially.

Parameters

separator: string

concurIterable: ConcurIterable<unknown>

Returns

Promise<string>

Example

console.log(
await pipe(
asConcur([`sloth`, `more sloth`, `even more sloth`]),
joinConcur(`, `),
),
)
//=> sloth, more sloth, even more sloth

Defined in

collections.d.ts:452