camelCase, kebab-case, PascalCase... a simple integration with nano package size. (SMALL footprint!)
Hey @mesqueeb I have been an active user of this library across many projects. One problem faced is that the library doesn't retain the literal types. It converts everything to string. For example ```ts type Fruit = "orange" | "banana" | "apple" const myFruit: Fruit ="orange"; const capitalCaseFruit = capitalCase(myFruit); // type of capitalCaseFruit = string instead of "Orange" | "Banana" | "Apple"; ``` ### Why this would be useful? I have had situations where I want to use the value to index an object. and if the value is string then I have to typecast it explicitly. Example from above ```ts const obj = { priceOrange: 10, priceBanana: 10, priceApple: 10, } obj[`price${capitalCaseFruit}`] = 20; // this is not typescript friendly. ``` of course simple thing to do is typecast it. But it would be great to have inbuilt type inference. I am willing to contribute to this feature if you guys are open to outside contributions. and eventually, we can add this support to all case types. I am not sure how difficult it would be but I all ears to suggestions. maybe we can have a separate functions for more stricter types? please let me know what you think about this.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by devarsh-mavani-19 and has received 1 comments.