({
creationTime,
key,
nodeId,
}: {
creationTime: Date;
key: string;
nodeId: string;
})
| 1 | import { kysely } from "~/server/db"; |
| 2 | |
| 3 | export const generatePersistentId = ({ |
| 4 | creationTime, |
| 5 | key, |
| 6 | nodeId, |
| 7 | }: { |
| 8 | creationTime: Date; |
| 9 | key: string; |
| 10 | nodeId: string; |
| 11 | }) => `${new Date(creationTime).toISOString()}_${key}_${nodeId}`; |
| 12 | |
| 13 | export const creationTimeFromPersistentId = (persistentId: string) => { |
| 14 | const [creationTime] = persistentId.split("_"); |
no outgoing calls
no test coverage detected