ISO-3166-Countries-with-Regional-Codes icon indicating copy to clipboard operation
ISO-3166-Countries-with-Regional-Codes copied to clipboard

Hyphen in keys

Open daverickdunn opened this issue 6 years ago • 3 comments

Using a hyphen in the object key names doesn't play very well with JavaScript and other languages. Please consider using underscores or camelCase.

daverickdunn avatar Aug 13 '18 14:08 daverickdunn

Thanks for your comment.

I agree. I'm tempted to go with underscores, just because one of the keys is iso_3166-2, and camelized it would become iso31662.

What do you think?

lukes avatar Aug 15 '18 23:08 lukes

I would prefer camelCase like "countryCode" but snake case, as proposed, for me, is better than kebab case.

andrerpena avatar May 07 '19 19:05 andrerpena

Snake case matches CSV heading data from ISO (noted in #31), and using a uniform whitespace character (snake_case) provides for a simpler conversion process than not using one (camelCase).

iso_3166-2 current iso31662 camel iso_3166_2 snake

jsejcksn avatar Nov 04 '19 20:11 jsejcksn