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

x/polkadot/util/bn/index.ts>bnToBn

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

Examples

import BN from 'https://esm.sh/bn.js@5.2.1';
import { bnToBn } from 'https://deno.land/x/polkadot@0.2.17/util/mod.ts';

bnToBn(0x1234); // => BN(0x1234)
bnToBn(new BN(0x1234)); // => BN(0x1234)

Type Parameters

ExtToBn extends ToBigInt | ToBn

Parameters

optional
value:
| HexString
| BN
| bigint
| string
| number
| null