Function
create
(prefix: string, direction: "descending" | "ascending", timestamp?: number)
Source from the content-addressed store, hash-verified
| 33 | } |
| 34 | |
| 35 | export function create(prefix: string, direction: "descending" | "ascending", timestamp?: number): string { |
| 36 | return prefix + "_" + createIdentifier(direction === "descending", timestamp) |
| 37 | } |
| 38 | |
| 39 | /** Extract timestamp from an ascending ID. Does not work with descending IDs. */ |
| 40 | export function timestamp(id: string): number { |
Tested by
no test coverage detected