sandbag
sandbag copied to clipboard
Are arrays of possible grades supposed to be part of the API?
src/index.ts
exports some constants whose purpose is unclear to me:
https://github.com/OpenBeta/sandbag/blob/d5c417065e6a8076447528345e643ead4285c941/src/index.ts#L266-L288
It may be useful to expose these in the API, but the intention is unclear and the current definitions are wrong and/or missing.
Are these used anywhere? Or just leftover from earlier versions?
If these exports are intentional, they need to be fixed:
- [ ]
bouldering
is empty - [ ] the analogous
ice
,aid
, etc aren't defined - [ ] class is defined in
freeClimbing
but not as aGradeScale
- [ ]
YDS_ARRAY
does not contain +/- grades - [ ] make it clear what is being exported: is it an ordered list of all possible non-slash grades for each scale for each discipline?
- [ ] The current tests are nearly tautological.
If these exports are removed, the arrays comprising them can be too. Even better, they could be used to make slash grades more robust, as in #158.
- [ ] delete exports
- [ ] move arrays to respective files in
src/scales/
and fix slash grades
@vnugent, do you have some insight on the intentions here?