Variable: join()
constjoin: {(separator): (iterable) =>string; (separator,iterable):string; }
Defined in: collections.d.ts:449
Returns the string concatenation of the values of iterable, separated by
separator.
Like Array.prototype.join, but for iterables, except it does not treat
null, undefined, or [] specially.
Call Signature
(
separator): (iterable) =>string
Parameters
separator
string
Returns
(
iterable):string
Parameters
iterable
Iterable<unknown>
Returns
string
Call Signature
(
separator,iterable):string
Parameters
separator
string
iterable
Iterable<unknown>
Returns
string
Example
import { join, map, pipe } from 'lfi'
console.log(
pipe(
[`sloth`, `lazy`, `sleep`],
map(word => word.toUpperCase()),
join(`, `),
),
)
//=> SLOTH, LAZY, SLEEP
Since
v0.0.1