mirror of
https://github.com/fluencelabs/libp2p-ts
synced 2025-06-20 08:16:30 +00:00
Init with bn.js
This commit is contained in:
12
bn.js/bn.js-tests.ts
Normal file
12
bn.js/bn.js-tests.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import BN = require('bn.js');
|
||||
|
||||
let bn = new BN(42);
|
||||
bn = bn.add(bn);
|
||||
bn.isZero();
|
||||
bn.byteLength;
|
||||
|
||||
BN.isBN(3); // false
|
||||
BN.isBN(bn); // true
|
||||
|
||||
bn.usubn(1); // 41
|
||||
bn.uaddn(1); // 42
|
Reference in New Issue
Block a user