RPA JS 扩展开发文档

RPA JS 扩展开发文档

  • SDK接口说明
  • 代码示例

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

ParameterTypeDescription
objectConfig

Returns:

Constructor

Last updated on 12/16/2020
  • BigNumber.clone() method
  • Parameters
Copyright © 2021 销售易