svelte-tel-input@4.3.0
·
17 commits
to main
since this release
Minor Changes
-
Performance and developer-experience improvements: (#274)
- O(1) country lookups: country resolution by ISO 3166-1 alpha-2 code now uses a prebuilt
Mapindex instead of a linear scan over the full country list. This path runs on every keystroke. - New
getCountryByIso2utility: a simple, type-safegetCountryByIso2(iso2)is now exported from bothsvelte-tel-inputandsvelte-tel-input/utils, replacing the stringly-typedgetCountry({ field, value })for the common case. - New opt-in
validatePropsprop: runtime prop type-checking is now controlled by thevalidatePropsprop (defaultfalse), so the checks add nothing to production bundles. Enable it (e.g. during development) to get descriptiveTypeErrors on malformed props. - Updated
libphonenumber-jsfrom1.12.42to1.13.6, bringing the latest phone-number metadata for several regions. - Smaller bundle: switched to the
libphonenumber-js/max/es6entry point (added in 1.13.0), trimming roughly 3.8–4.1 KB gzipped from consumer bundles.
- O(1) country lookups: country resolution by ISO 3166-1 alpha-2 code now uses a prebuilt