(epochMs: number)
| 82 | |
| 83 | // separate from idFactory because it's only used by tests and adds unnecessary complexity/conditionals to idFactory |
| 84 | export const rawIdWithTime = (epochMs: number) => { |
| 85 | const id = new Uint8Array(idLength) |
| 86 | crypto.getRandomValues(id) |
| 87 | prefixEpochToArray(epochMs, id) |
| 88 | return id |
| 89 | } |
| 90 | |
| 91 | export let rawId = idFactory() |
| 92 | export function hexId(): Hex { |
no test coverage detected