Files
common/docs/util/modules/_bn_tobn_.md
T
2019-02-26 15:09:10 +00:00

749 B

Functions

bnToBn

▸ bnToBn(value?: BN | number | null): BN

Defined in bn/toBn.ts:23

name: bnToBn

summary: Creates a BN value from a BN.js bignumber or number input.

description: null inputs returns a 0x0 result, BN values returns the value, numnbers returns a BN representation.

example:

import BN from 'bn.js';
import { bnToBn } from '@polkadot/util';

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

Parameters:

Name Type
Optional value BN | number | null

Returns: BN