mvp-ai's picture
download
raw
803 Bytes
// Copyright (c) 2026 the Zuke contributors
// SPDX-License-Identifier: MIT
/**
* The one check every numeric limit setter applies, so a `NaN`, a negative or
* a zero cannot quietly turn a bound off: `NaN` compares false against
* everything, so a `NaN` size cap would let any download through and a zero
* poll interval would hammer SignPath for the whole wait.
*
* Internal: not re-exported from `mod.ts`.
*
* @module
*/
/**
* `value` when it is a whole number of at least `min`, else an error naming
* the setter.
*/
export function wholeAtLeast(
value: number,
min: number,
setter: string,
): number {
if (!Number.isSafeInteger(value) || value < min) {
throw new Error(
`${setter} needs a whole number of at least ${min}, not ${value}.`,
);
}
return value;
}

Xet Storage Details

Size:
803 Bytes
·
Xet hash:
f5df1c70023c4fb335ffbd7f15d2b9f53ca8708de7544ebdcacefd39e36f6d73

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.