0.0.12 • Published 9 months ago

@solocker/safe-bn v0.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@solocker/safe-bn

To install

bun install @solocker/safe-bn

Usage

By default safe-bn support 3 decimal places to increase add the optional decimal param

Perform BigNumber mathematical operations

const target = 3124.456;
const safeBnRepresentation = safeBN(target);
// reverse to unSafe after performing mathematical operations
const unSafeRepresentation = unSafe(safeRepresentation);

Convert to Number from hex or BN

/// This unwrap safeBN, note don't pass unSafe output, convert first to save before this
const backToTarget = unSafeToNumber(safeRepresentation);
0.0.10

9 months ago

0.0.11

9 months ago

0.0.12

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.3

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago