How fcevado/phone works
Main Components Structure
• Phone Library |
• Core Parser | | Country Modules | | Helpers | | Tests | |
Component Details
a. Core Parser (lib/phone.ex)
• Input/output flow
• Main parsing logic
b. Country Modules Organization (lib/phone/*)
• Countries
• Regular Countries
• Individual Country Modules
• Country-specific Area Codes
• NANP Countries
• US States
• Canadian Provinces
• Other NANP Territories
c. Helpers (lib/helpers/)
• Three helper modules:
• Area Helper
• Country Helper
• Parser Helper
Data Flow Representation
• [Input Phone Number] → [Parser] → [Country Module] → [Area Code Lookup] → [Result Map]
• ◆ Core Component
• ◇ Country Module
• ○ Helper Module
• → Data Flow
• ⇢ Optional Flow (Area Code Lookup)
Additional Elements
• Input/output format examples
• Two different result patterns as described in the README
• Version information and performance notes
Key Architectural Points to Emphasize: