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

x/polkadot/util/buffer/toU8a.ts>bufferToU8a

Package publishing for deno.land/x/polkadot
Go to Latest
function bufferToU8a
import { bufferToU8a } from "https://deno.land/x/polkadot@0.2.37/util/buffer/toU8a.ts";

Examples

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

bufferToU8a(Buffer.from([1, 2, 3]));

Parameters

optional
buffer: Uint8Array | number[] | null

Returns

Uint8Array