Skip to main content
Module

x/polkadot/mod.ts>util.bufferToU8a

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

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