Download src/audit/audit-cursor.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/audit/audit-cursor.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/audit/audit-cursor.ts
-
curl -L -o audit-cursor.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/audit/audit-cursor.ts
480 Bytes
| import { parseStrictPositiveInteger } from "@openclaw/normalization-core/number-coercion"; | |
| /** Parse the digit-only positive cursor grammar shared by audit CLI and Gateway paging. */ | |
| export function parsePositiveAuditCursor(cursor: string | undefined): number | undefined | null { | |
| if (cursor === undefined) { | |
| return undefined; | |
| } | |
| const trimmed = cursor.trim(); | |
| if (!/^\d+$/.test(trimmed)) { | |
| return null; | |
| } | |
| return parseStrictPositiveInteger(trimmed) ?? null; | |
| } | |