xsy-breeze-ui-rpa > BigNumber > clone
BigNumber.clone() method
Returns a new independent BigNumber constructor with configuration as described by object, or with the default configuration if object is null or undefined.
Throws if object is not an object.
config({ DECIMAL_PLACES: 5 })
BN = clone({ DECIMAL_PLACES: 9 })
x = new BigNumber(1)
y = new BN(1)
x.div(3) // 0.33333
y.div(3) // 0.333333333
// BN = clone({ DECIMAL_PLACES: 9 }) is equivalent to:
BN = clone()
BN.config({ DECIMAL_PLACES: 9 })
Signature:
static clone(object?: Config): Constructor;
Parameters
| Parameter | Type | Description |
|---|---|---|
| object | Config |
Returns:
Constructor
