lukes/ISO-3166-Countries-with-Regional-Codes

Hyphen in keys

daverickdunn opened this issue · 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.

lukes commented

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?

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

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