Package: "xcase": "^2.0.1"
Repro
camelizeKeys({ Key: 'value' })
Observe result:
{Key: 'value'}
Expected:
{key: 'value'}
This behavior appears to originate here:
|
if (isDigit(firstChar) || isUpper(firstChar) || firstChar == separator) { |
isUpper(firstChar) causes the method to return without modifying the key and
|
if (isUpper(firstChar)) { |
never gets a chance to execute.