Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - database/ (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
847 B
JavaScript
17 lines
847 B
JavaScript
import AsYouType from './AsYouType.js'
|
|
|
|
/**
|
|
* Formats a (possibly incomplete) phone number.
|
|
* The phone number can be either in E.164 format
|
|
* or in a form of national number digits.
|
|
* @param {string} value - A possibly incomplete phone number. Either in E.164 format or in a form of national number digits.
|
|
* @param {string|object} [optionsOrDefaultCountry] - A two-letter ("ISO 3166-1 alpha-2") country code, or an object of shape `{ defaultCountry?: string, defaultCallingCode?: string }`.
|
|
* @return {string} Formatted (possibly incomplete) phone number.
|
|
*/
|
|
export default function formatIncompletePhoneNumber(value, optionsOrDefaultCountry, metadata) {
|
|
if (!metadata) {
|
|
metadata = optionsOrDefaultCountry
|
|
optionsOrDefaultCountry = undefined
|
|
}
|
|
return new AsYouType(optionsOrDefaultCountry, metadata).input(value)
|
|
} |