Skip to content

docs: recommend string identifiers for numeric codes#170

Merged
bhousel merged 1 commit intomainfrom
docs/string-identifiers-warning
Apr 24, 2026
Merged

docs: recommend string identifiers for numeric codes#170
bhousel merged 1 commit intomainfrom
docs/string-identifiers-warning

Conversation

@bhousel
Copy link
Copy Markdown
Collaborator

@bhousel bhousel commented Apr 24, 2026

Summary

Recommend string identifiers over numeric ISO numeric-3 / UN M49 inputs in the docs.

Why

JavaScript can misparse leading-zero numeric literals like 021, 030, or 053 in non-strict code before country-coder receives them.
Runtime support for numeric identifiers remains unchanged, but the README should stop advertising bare numeric examples as the preferred usage.

Changes

  • add GitHub warning callouts in the README
  • recommend string identifiers for numeric-looking codes
  • convert bare numeric README examples to strings
  • keep runtime behavior and tests unchanged

- add warning callouts about leading-zero numeric literal hazards
- stop advertising bare numeric identifier examples in the README
- keep runtime behavior unchanged
@bhousel bhousel marked this pull request as ready for review April 24, 2026 13:38
@bhousel bhousel merged commit d89d624 into main Apr 24, 2026
1 check passed
@bhousel bhousel deleted the docs/string-identifiers-warning branch April 24, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant