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

x/polkadot/util/bn/sqrt.ts>bnSqrt

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

Examples

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

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

Type Parameters

ExtToBn extends ToBn

Parameters

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