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.

30 lines (29 loc) 994 B
import { type LambdaResult } from '../_shared/lambda-helpers'; export interface NetlifyEvent { body: string | null; headers: { [key: string]: string | undefined; }; httpMethod: string; path: string; queryStringParameters: { [key: string]: string | undefined; } | null; isBase64Encoded?: boolean; rawUrl?: string; } export type NetlifyResult = LambdaResult; export interface NetlifyContext { functionName?: string; awsRequestId?: string; identity?: unknown; clientContext?: unknown; } export declare function netlifyHandler(event: NetlifyEvent, _context?: NetlifyContext): Promise<NetlifyResult>; /** Single-route convenience — infers single vs. batch from the body. */ export declare function netlifyFunction(event: NetlifyEvent, _context?: NetlifyContext): Promise<NetlifyResult>; declare const _default: { netlifyHandler: typeof netlifyHandler; netlifyFunction: typeof netlifyFunction; }; export default _default;