feat(core): sums and totals over arrays of minor units
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start with docs/reference/limitations.md and the existing sum and fromMinor implementations to understand their precision and performance behavior. The issue leaves the API name and whether to add min, max, or average undecided, so those decisions need to be resolved before implementation. Done means an exact array summation API, validation for number inputs, benchmarks showing no regression to sum, and documentation of the min/max/average decision.
Written by the indexing model from the issue text.
Description
From docs/reference/limitations.md (Alex, 2026-11-13: worth doing soon).
There's no columnar API: summing a Float64Array, BigInt64Array or plain array of minor units means building a Money per element.
-
sumMinor(values, currency, { scale? })(name to decide) taking number arrays, typed arrays and bigint arrays, exact, with the same number fast path plus bigint fallback assum - refuses non-integers and unsafe numbers in number arrays, like
fromMinor - a benchmark against summing Money values, with no regression to
sum - decide whether min/max/average belong here too; document the decision
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 35m
- Merged PRs (30d)
- 242
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from public/ducat
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
public/ducat#349 · 1 comment ·
Maintainers usually reply within 1 day
-
area: core
Difficulty 4/5 3-5 days Newbie friendliness 43/100
Maintainers usually reply within 1 day
-
area: tests
Difficulty 3/5 1-2 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
-
area: core
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
software-mansion/argent#1946 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
podman-desktop/podman-desktop#20216 ·
Maintainers usually reply within 1 day
-
[Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
WordPress/ai#1386 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
omdsh-dev/DSH-better-sidebar#1205 ·
Maintainers usually reply within 3 days