mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-12 13:06:04 +00:00
refactor(numbers): share non-negative finite guard
This commit is contained in:
@@ -1,2 +1,6 @@
|
||||
/** Shared numeric coercion facade for legacy imports inside core. */
|
||||
export * from "@openclaw/normalization-core/number-coercion";
|
||||
|
||||
export function resolveNonNegativeNumber(value: number | null | undefined): number | undefined {
|
||||
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user