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
would you consider support of object keys case transformation to *Case types (like SnakeCase, CamelCase, DashCase etc.)?
Another library called type-festalready supports these types. Also, here is trivial implementation of SnakeCase to CamelCase scenario, although I am not qualified to check correctness of the implementation, which seems to be surprisingly simple.
There are many use cases for this kind of feature, for example when handling difference of object keys case between front-end and back-end apps, where you usually struggling with camel-case to snake-case transformations and vice versa in request/response payloads.
By the way, I was wondering if there is library which transforms object keys case at runtime and I found this one - change-case. Although I didn't use it yet, it may offers a simple solution to described problem in combinations with proposed *Case types.
Now that string templating is possible it's possible to build your own type-level parsers and formatters. Here's what I'd suggest as a start:
Motivation
Writing a type-safe routing library, these are utility types that I've mostly already defined.
The text was updated successfully, but these errors were encountered: