Closed WofWca closed 9 months ago
I took a look but it's honestly too complex for me to consider maintaining for the marginal benefit it provides. You're welcome to type and maintain them here though if you'd like, but I'd probably consider keeping them separate from the main package due to the type complexity and potential build perf issues.
Currently the functions output simple TypeScript
strings
. Template literals were introduced not too long ago, so now the following is possible:That is, the exact string literal is derived from the input string literal.
Here's an article on how to achieve this: https://dev.to/svehla/typescript-transform-case-strings-450b And another library already implements this (MIT license as well): https://github.com/madonoharu/literal-case/blob/8d190d865cdcaf65ed639bdc40447410202f97a8/src/types.ts
Would be cool to see it at, least for some of the functions of this library.