You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This probably belongs more in a discussion area than as an issue, but I don't see one, so here we go!
I'm looking for your thoughts on the best way to handle additional unit names, specifically ones that are underscore separated or camel/Pascal case.
Options
Convert them manually before running them through the convert library. The downside of this is that you lose typesafety since it's happening at runtime. The upside is that the library remains opinionated.
Update the codebase with new names for every unit. The downsides are added codebase complexity and maintainability is decreased (especially if there's ever a need to add more names in the future). The upside is there's no major modifications to how the library works.
Convert them within convert. Similar to 1, but a nicer experience for any library users.
The text was updated successfully, but these errors were encountered:
Unfortunately, I don't think there's really a good way to add this functionality directly to convert, your best option is probably the 1st one you listed.
The downsides you listed under option 2 are pretty spot-on, it'd be quite a headache to just add in a bajillion aliases for each supported name format. Option 3 of doing the normalization in convert would work, but it seems tricky to make that work reliably & without hurting performance. The types would probably be a headache to make work but seem like TS is powerful enough to handle that?
This probably belongs more in a discussion area than as an issue, but I don't see one, so here we go!
I'm looking for your thoughts on the best way to handle additional unit names, specifically ones that are underscore separated or camel/Pascal case.
Options
convert
library. The downside of this is that you lose typesafety since it's happening at runtime. The upside is that the library remains opinionated.convert
. Similar to 1, but a nicer experience for any library users.The text was updated successfully, but these errors were encountered: