sindresorhus / camelcase-keys

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

decimal points in keys are stripped by camelcaseKeys #64

Closed toneworm closed 4 years ago

toneworm commented 4 years ago

This wouldn't be my approach but I've inherited a codebase which uses floats as keys in some of the api responses. These get stripped out when using camelcaseKeys.

const camelcaseKeys = require('camelcase-keys');
camelcaseKeys({ 2.95: true }); // { 295: true }
sindresorhus commented 4 years ago

You can exclude such keys with the exclude option. It's not something that will be handled here.