Skip to main content
Module

x/polkadot/mod.ts>util.bnSqrt

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

Examples

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

bnSqrt(new BN(16)).toString(); // => '4'

Type Parameters

ExtToBn extends ToBn

Parameters

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