Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/util/u8a/index.ts>u8aToU8a

Package publishing for deno.land/x/polkadot
Go to Latest
function u8aToU8a
import { u8aToU8a } from "https://deno.land/x/polkadot@0.2.19/util/u8a/index.ts";

Examples

import { u8aToU8a } from 'https://deno.land/x/polkadot@0.2.19/util/mod.ts';

u8aToU8a(new Uint8Array([0x12, 0x34]); // => Uint8Array([0x12, 0x34])
u8aToU8a(0x1234); // => Uint8Array([0x12, 0x34])

Parameters

optional
value: U8aLike | null

Returns

Uint8Array