ts-money icon indicating copy to clipboard operation
ts-money copied to clipboard

fix(allocate): correct allocation with a zero ratio item

Open dotpack opened this issue 4 years ago • 0 comments

const results = new Money(29900, Money.EUR).allocate([265.09, 0, 33.91]).map(money => money.toDecimal());
// returns [265.09, 0.01, 33.9] instead of [265.09, 0.00, 33.91]

dotpack avatar Jan 29 '21 11:01 dotpack