Skip to content

parseSortableLeaf

function parseSortableLeaf(keyOrLeaf):
| {
id: string;
ms: number;
}
| null;

Defined in: src/storage/keys.ts:49

Parse a sortableLeaf (or a key ending in one) back into { ms, id }. Returns null when the trailing segment has no ~, the millis are not a number, or the id is empty. The id is returned verbatim (not decoded).

Parameter Type
keyOrLeaf string

| { id: string; ms: number; } | null