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

x/polkadot/util/mod.ts>bufferToU8a

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

Examples

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

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

Parameters

optional
buffer: Buffer | number[] | null

Returns

Uint8Array