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.

20 lines (19 loc) 723 B
import type { ResourceLoader } from './types'; export interface NodeFsResourceLoaderOptions { /** * Override the directory where `geocodes/`, `carrier/`, and * `timezones.bson` live. Defaults to the bundled `resources/` next to the * built `dist/` directory. */ resourcesDir?: string; } /** * Sync + async loader backed by `node:fs`. Async methods exist for parity * with custom loaders and just wrap the sync read. */ export declare class NodeFsResourceLoader implements ResourceLoader { private readonly baseDir; constructor(options?: NodeFsResourceLoaderOptions); loadResource(path: string): Promise<Uint8Array | null>; loadResourceSync(path: string): Uint8Array | null; }