> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# join (Functional Programming) es-toolkit

Creates a function that joins array values into a string. Use it with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
const result = pipe(array, join(separator));
```

::: info

This helper is specific to `es-toolkit/fp`. Use it when you want this operation as part of a [`pipe`](https://massaman.dev/reference/fp/pipe.md) pipeline.

:::

## Usage

`join` converts the piped array to a string by joining its values with `separator`. When `separator` is omitted, it uses a comma.

```typescript
import { join, pipe } from 'es-toolkit/fp';

pipe(['a', 'b', 'c'], join('-')); // => 'a-b-c'

pipe(['a', 'b', 'c'], join()); // => 'a,b,c'
```

#### Parameters


separatorstring, optionalrequired

The string inserted between values. Defaults to `,`.

#### Returns

A function that maps a `readonly T[]` to a joined string.

```typescript
(array: readonly T[]) => string
```


Source: es-toolkit

Re-exported verbatim from [`es-toolkit`](https://es-toolkit.dev/fp/reference/join.html). Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.
