Docs

fromBytes

Converts a Uint8Array to the specified type.

Example

import { fromBytes } from "thirdweb/utils";
const bytes = new Uint8Array([1, 164]);
const number = fromBytes(bytes, "number");
console.log(number); // 420

Parameters

Returns

The converted value of the specified type.