Make `convertToSnakeCase` gracefully handle edge cases
What does this MR do?
Updates the convertToSnakeCase
utility function to gracefully handle edge cases. In particular, the function would previously throw an error if a string containing only digits was passed (e.g. "123").
Previously, the function would fail if the regex it used internally failed to match the input string.
Now, if the regex doesn't match the input string, it will simply return the slugify
'd version of the input string instead of throwing an error.
Context
Discovered while putting together !33437 (merged).
Edited by Nathan Friend