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

# isWeakSet es-toolkit

Checks if a given value is a `WeakSet` instance.

```typescript
const result = isWeakSet(value);
```

## Usage

### `isWeakSet(value)`

Use `isWeakSet` when you want to check if a value is a WeakSet instance.

```typescript
import { isWeakSet } from 'es-toolkit/predicate';

// WeakSet instances
const weakSet1 = new WeakSet();
const weakSet2 = new WeakSet([{}, []]);

console.log(isWeakSet(weakSet1)); // true
console.log(isWeakSet(weakSet2)); // true

// Non-WeakSet values
console.log(isWeakSet(new Set())); // false
console.log(isWeakSet(new Map())); // false
console.log(isWeakSet(new WeakMap())); // false
console.log(isWeakSet([])); // false
console.log(isWeakSet({})); // false
console.log(isWeakSet(null)); // false
console.log(isWeakSet(undefined)); // false
```

#### Parameters


valueunknownrequired

The value to check if it's a WeakSet instance.

#### Returns

Returns `true` if the value is a WeakSet instance, `false` otherwise.

```typescript
value is WeakSet<WeakKey>
```


Source: es-toolkit

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