Follow-up from "Reference all Release data using `camelCase`"
The following discussion from !24700 (merged) should be addressed:
-
@nfriend started a discussion: (+1 comment) The
convertObjectPropsToCamelCasefunction automatically translates_linkstoLinks. This is a bit weird, but I went with it since trying to make an exception for this one property seemed like more work than it was worth.(And just for some context: there's already an
assets.linksproperty in this response, which is distinct from_links.)
copied from discussion:
I’m concerned that this behavior is a bug (or use case omission) in the camelCase utility.
For one, having properties that begin with a capital letter violates our usual naming conventions.
Secondly, property names prefixes with _ often denote some special meaning and this context will be lost in translation.
I believe we ought to update our utility to preserve underscores (and capitalization) in cases where they are found at the beginning or end of a string.
e.g. a._link -> a._link, b._private_var -> b._privateVar, c._reserved_ -> c._reserved_