[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [BigInt](https://evolu.dev/docs/api-reference/common/BigInt) › clampBigInt

```ts
function clampBigInt(min: bigint, max: bigint): (n: bigint) => bigint;
```

Defined in: [packages/common/src/BigInt.ts:17](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/BigInt.ts#L17)

Clamps a bigint within a given range.