Add max, min, and sum functions for dynamic badges
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
Are you experiencing an issue with...
- [x] [shields.io](https://shields.io/#/)
- [ ] My own instance
- [ ] [badge-maker NPM package](https://www.npmjs.com/package/badge-maker)
:beetle: **Description**
`.max()`, `.sum()`, `.min()` functions in dynamic badge queries don't work.
Support for `.max()`, `.sum()`, `.min()` would be a great help and improve the flexibility of dynamic badges.
Examples:`$.numbers.sum()`, `$.numbers.min()`, `$.numbers.max()`, `$.sum($.numbers.max())`
:link: **Example badges**
Doesn't work when `.sum()` is present: 
Works when `.sum()` is not present: 
:bulb: **Possible Solution**
I think this is a problem with the upstream `jsonpath` library, and I have filed an [issue](https://github.com/dchester/jsonpath/issues/153) in that repo as well. I thought informing the maintainers of this project as well would be a good idea.
Thanks!
Contributor guide
Research direction
Reproduce the failing dynamic JSON badge URL and compare it with the working URL. Then inspect the dynamic badge query path and its upstream jsonpath dependency, using the listed $.numbers and $.sum examples as acceptance cases; done means max, min, and sum queries work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100