sindresorhus / camelcase-keys

Convert object keys to camel case
MIT License
691 stars 95 forks source link

transforms {'4.2': 'foo'} into {'42': 'foo'} #68

Open hyposlasher opened 4 years ago

hyposlasher commented 4 years ago

camelcase-keys transforms {'4.2': 'foo'}into {'42': 'foo'} i.e. removes decimal point

sindresorhus commented 4 years ago

That is technically the correct behavior. There's no . in a camel-cased string.

However, I agree, it's never the wanted result, so we can skip the key if it's a valid number.