behave of camelCase with a number
caoglish opened this issue · 2 comments
caoglish commented
When camelCase with special characters, the characters will be removed.
But when I camelCase with a number, the number will not be removed and the letter next to the number will be capitalized. I am not sure the behave is correct or not.
version: 1.0.0
example:
v.camelCase("BIRD1FLIGHT")
//=> "bird1Flight"
v.camelCase("bird-1flight")
//=>"bird1Flight"
v.camelCase("bird-1flight-111-1--bi4rd 1flight")
//"bird1Flight1111Bi4Rd1Flight"
panzerdp commented
Yes, this is the intended behavior.
Every series of consecutive numbers is considered a separated word.
v.camelCase('this is 2nd library version');
// => "thisIs2NdLibraryVersion"
v.camelCase('today is 20 December');
// => "todayIs20December"
caoglish commented
Thanks