Having a difficult time finding a solution to this, there are several solutions for the reverse.
I have considered replacing every " " and the following first character with an uppercase version of itself:
value.toLowerCase().replace(/\s+/g, function (g) { return g[1].toUpperCase() })
Only, the regex /\s+/g needs to be changed to match the first character.
If there is an existing question that is exactly this, provide link and I will close this myself. I can't find a solution on SO
Examples:
"I walk my dog to the park" or "i Walk my DOG to the Park" => "iWalkMyDogToThePark"