@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.
15 lines (14 loc) • 694 B
TypeScript
import type { PhoneValidationResult } from '../serverless/_shared/dispatch';
import { validateSingle } from '../serverless/_shared/dispatch';
import type { ParsedArgs } from './parse-args';
export interface CliRunDeps {
validate?: typeof validateSingle;
writeFile?: (path: string, contents: string) => void;
ensureDir?: (path: string) => void;
stdout?: (line: string) => void;
stderr?: (line: string) => void;
now?: () => Date;
}
export declare function logFileNameFor(phoneNumber: string, when: Date): string;
export declare function run(args: ParsedArgs, deps?: CliRunDeps): Promise<number>;
export declare function exitCodeFor(result: PhoneValidationResult): number;