UNPKG

@phonecheck/phone-number-validator-js

Version:

Validate, parse, and enrich international phone numbers — geocoding, carrier lookup, and timezone resolution. Sync (Node) + async (serverless) APIs, platform adapters, and a CLI.

18 lines (17 loc) 1.1 kB
/** * Pure serverless validator surface. * * No `node:fs` imports → safe for any edge / browser / Workers runtime. * Bring your own `ResourceLoader` via `setResourceLoader()` before calling * the lookup functions; the loader is the integration point for KV / R2 / * S3 / `fetch`-based resource hosting. * * For Node.js use, prefer the main entry: it ships a built-in fs loader so * you don't need to wire one up. */ export * from 'libphonenumber-js'; export { clearCache, DEFAULT_CACHE_SIZE, getCacheSize, getCacheStats, setCacheSize } from '../cache'; export { carrier, carrierAsync, type EnrichmentResult, type EnrichOptions, enrichPhoneNumber, geocoder, geocoderAsync, getResourceLoader, setResourceLoader, timezones, timezonesAsync, } from '../core'; export type { CacheStats, CarrierLocale, GeocoderLocale, LookupTable, MaybePhoneNumber, ResourceKind, ResourceLoader, } from '../types'; export { FetchResourceLoader, type FetchResourceLoaderOptions } from './loaders/fetch-loader'; export { type KvNamespace, KvResourceLoader, type KvResourceLoaderOptions } from './loaders/kv-loader';