Ad
  • Custom User Avatar

    Sure! It can be. What do you have in mind?

  • Custom User Avatar

    if/else could be made less verbose

  • Custom User Avatar

    Are you sure about the syntax of that last paragraph? Didn't you mean to write

    foo = foo.wrap(function (original) {
      // do some enhanced functionality...
      original();  // now call the original
    })
    
  • Custom User Avatar

    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?

  • Custom User Avatar

    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.