Closed zhaohuihua closed 3 years ago
I don't see a need for
|| v instanceof Number
when
new Decimal(this)
in your example could simply be replaced with
new Decimal(+this)
or new Decimal(Number(this))
or new Decimal(this.valueOf())
etc.
I changed Symbol.for
to Symbol['for']
in v10.3.0.
Thanks for your input.
TestCode (2).toFixed(2); will be run to line 4340 thrown error '[DecimalError] Invalid argument: 2' because line 4290 test typeof v returned 'object' if (t === 'number') changed to if (t === 'number' || v instanceof Number)