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
Copy file name to clipboardExpand all lines: README.md
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,25 @@ import Enum from "enum-xyz";
24
24
const { Summer, Autumn, Winter, Spring } = Enum.String();
25
25
26
26
console.log(Summer); // Outputs: "Summer"
27
-
console.log(Autumn); // Outputs: "Autumn"
28
-
console.log(Winter); // Outputs: "Winter"
29
-
console.log(Spring); // Outputs: "Spring"
27
+
```
28
+
29
+
#### Options for String Enums:
30
+
31
+
-`casing`: Transforms the string based on the specified casing style. Available options are `snakeCase`, `camelCase`, `PascalCase`, `kebabCase`, `lowercase`, and `uppercase`.
32
+
-`transform`: Provide a custom function to transform the enum values. This function takes the original value and returns a transformed value.
0 commit comments