> 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.

# isSubset (Functional Programming) es-toolkit

Creates a function that checks whether the piped array is a subset of another array. Use it with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
const result = pipe(array, isSubset(superset));
```

::: info

Prefer the original es-toolkit [`isSubset`](https://massaman.dev/reference/array/isSubset.md) in ordinary code. Use this `fp` variant when composing transformations with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

:::

## Usage

`isSubset` returns `true` when every value in the piped array is present in `superset`.

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

pipe([1, 2], isSubset([1, 2, 3])); // => true

pipe([1, 4], isSubset([1, 2, 3])); // => false
```

#### Parameters


supersetreadonly T[]required

The array that may contain all values from the piped array.

#### Returns

A function that maps a `readonly T[]` to whether it is a subset.

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


Source: es-toolkit

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