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

x/polkadot/util/mod.ts>numberToHex

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

Examples

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

numberToHex(0x1234); // => '0x1234'
numberToHex(0x1234, 32); // => 0x00001234

Parameters

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

Returns

HexString