From bb437da9e4aceac6b4ad231443f9f1131857441b Mon Sep 17 00:00:00 2001 From: Geoff Cowan Date: Thu, 24 Apr 2025 12:52:42 +1000 Subject: [PATCH] Expose a Decimal.zero utility value Looking to expose a quality of life constant, ala https://github.com/shopspring/decimal/blob/a1bdfc355e9c71119322b748c95f7d6b82566e30/decimal.go#L74 --- decimal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/decimal.js b/decimal.js index a5687fe..4fe6bf1 100644 --- a/decimal.js +++ b/decimal.js @@ -4458,6 +4458,7 @@ Decimal.tan = tan; Decimal.tanh = tanh; // ES6 Decimal.trunc = trunc; // ES6 + Decimal.zero = new Decimal(0); if (obj === void 0) obj = {}; if (obj) {