API reference › @evolu/common › Type › idBytesToId
function idBytesToId(
value: Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"IdBytes">,
): string & Brand<"Id">;
Defined in: packages/common/src/Type.ts:6198
Example
import {
assertEqual,
createIdFromString,
idBytesToId,
idToIdBytes,
} from "@evolu/common";
const value = createIdFromString("todo");
assertEqual(idBytesToId(idToIdBytes(value)), value);