• Blog
  • Changelog
  • Follow us on GitHubFollow us on XJoin our Discord server
  • Blog
  • GitHub
  • Releases
  • Getting started

    • Quickstart
  • Library

    • Result
    • Type
    • Dependency injection
    • Conventions
  • Local-first

    • Examples
    • Protocol
    • Relay
    • Owner
    • Indexes
    • Migrations
    • Patterns
    • Time travel
    • Privacy
    • FAQ
  • Other

    • API reference
    • Comparison
    • Showcase
    • Changelog

API reference / @evolu/common / BigInt / clampBigInt

Function: clampBigInt()

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

Defined in: packages/common/src/BigInt.ts:11

Clamps a bigint within a given range.

Parameters

ParameterType
minbigint
maxbigint

Returns

(n): bigint;

Parameters

ParameterType
nbigint

Returns

bigint

Was this page helpful?

© Copyright 2025. All rights reserved.

Follow us on GitHubFollow us on XJoin our Discord server