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

x/polkadot/util/number/toU8a.ts>numberToU8a

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

Examples

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

numberToU8a(0x1234); // => [0x12, 0x34]

Parameters

optional
value: number | null
optional
bitLength = [UNSUPPORTED]

Returns

Uint8Array