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

x/polkadot/util/number/index.ts>numberToHex

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

Examples

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

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

Parameters

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

Returns

HexString