-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toSnakeCase function is broken when converting from camelCase #169
Comments
woking on it |
Any updates? |
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This updates the regexp that is used to handle camelCase and StartCamelCase strings. Fixes tommmyy#169
dphaener
pushed a commit
to dphaener/ramda-extension
that referenced
this issue
Oct 27, 2020
The regex that was previously used to convert strings to snake_case did not account for camelCase or StartCamelCase strings, so it simply downcased the entire string and returned that. This adds a new regex that is used to handle camelCase and StartCamelCase strings, as well as the strings previously present in the test cases. This also adds a new function called `splitByNonDowncaseAlphaNumeric` that will split a string based on this new regex, trim whitespace from all strings, and then reject empty strings. Fixes tommmyy#169
3 tasks
Cool, hope I'll have a time to join the discussion |
Any update on when this might get merged/fixed? Thanks :) Also, another handy thing would be to have the compliment of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Using the snake case function on a camel cased string does not properly convert the string:
To Reproduce
https://ramda-extension.firebaseapp.com/repl/?v=%5E0.26.1&ve=0.10.1#?R_.toSnakeCase%28%27fooBar%27%29
Expected behavior
It should properly convert the string:
Additional context
N/A
The text was updated successfully, but these errors were encountered: