Okay, so when I look at this I am confused by the description. Am I extending it to provide a wrapper that will only handle the speaking case? Or am I trying to make a wrapper that will take any function and wrap it with some additional functionality?
However, the actual test cases to pass it does just the opposite, where dashes (-) require the output to be PascalCased , while the underscores (_) require the output to be camelCased.
Sure! It can be. What do you have in mind?
if/else could be made less verbose
Are you sure about the syntax of that last paragraph? Didn't you mean to write
Okay, so when I look at this I am confused by the description. Am I extending it to provide a wrapper that will only handle the speaking case? Or am I trying to make a wrapper that will take any function and wrap it with some additional functionality?
Your test cases are backwards on this one. On the instructions it says that:
// returns "theStealthWarrior"
toCamelCase("the-stealth-warrior")
// returns "TheStealthWarrior"
toCamelCase("The_Stealth_Warrior")
However, the actual test cases to pass it does just the opposite, where dashes (-) require the output to be PascalCased , while the underscores (_) require the output to be camelCased.