API Reference / @evolu/common / Number

Number

Functions

FunctionDescription
clampClamps a number within a given range.
computeBalancedBucketsDivides items into buckets as evenly as possible, ensuring each bucket has at least the minimum number of items. Returns a success result if the minimum is met, or an error result with the required number of items if not.
decrement-
increment-
isBetweenCreates a predicate that checks if a number is within a range, inclusive.
maxReturns the maximum value, preserving branded type if applicable.
minReturns the minimum value, preserving branded type if applicable.

Was this page helpful?