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

x/polkadot/util/mod.ts>bnSqrt

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

Examples

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

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

Type Parameters

ExtToBn extends ToBn

Parameters

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