compote-ui
Version:
An opinionated UI component library for Svelte, built on top of [Ark UI](https://ark-ui.com) with additional components and features not available in the core Ark UI library.
12 lines (11 loc) • 639 B
TypeScript
/**
* Generic, country-agnostic readability formatter for E.164-ish phone strings
* (e.g. `+381601234567` -> `+381 601234567`). Splits off the country calling
* code using a static ITU code table and adds a single space after it; the
* subscriber number itself is left ungrouped, since grouping it correctly
* requires per-country number-plan knowledge (trunk codes, area codes, etc.)
* that doesn't belong in a generic default — apply a `cell` callback for
* locale-accurate national formatting. Values that don't start with `+` are
* returned unchanged.
*/
export declare function formatPhoneCellValue(value: string): string;