sindresorhus / camelcase-keys

Convert object keys to camel case
MIT License
679 stars 92 forks source link

Exclude children at the given keys from being camel-cased #91

Closed saawsan closed 1 year ago

saawsan commented 2 years ago

Hi,

I propose a new feature, the stopKeys: string[] option.

What does the option do? Similarly to the stopPaths option, the stopKeys option will exclude all children meeting the specified criteria. stopKeys allows to define a list of keys that should be detected when parsing the object. If one of the key is found, the parser stops and does not convert the children.

Why do we need this option? This feature is helpful when we need to convert the keys of an object but want to exclude some keys under a specific parent. In most cases stopPaths can probably answer the need, however when we do not have full knowledge and control over the structure of the object to convert, then it can be difficult to create and maintain the correct paths.

sindresorhus commented 2 years ago

Can you rebase from main branch and fix the merge conflict?

sindresorhus commented 1 year ago

Bump

sindresorhus commented 1 year ago

Closing for lack of activity.