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) 1.41 kB
/** * Serverless entry point — barrel re-exports for every adapter, plus the * pure validator and the helpers that custom-adapter authors need. Bundle * size is dominated by `libphonenumber-js`; importing a single adapter * (`./serverless/aws`, etc.) avoids pulling in the others. */ export { corsHeaders, jsonHeaders } from './_shared/cors'; export { executeValidation, type PhoneValidationResult, validateBatch, validateSingle, } from './_shared/dispatch'; export { decodeLambdaBody, type LambdaLikeEvent, type LambdaResult, lambdaResponse, } from './_shared/lambda-helpers'; export { classifyRoute, healthPayload, type Route } from './_shared/routes'; export { type BatchOptions, type BatchValidation, classifyRequest, extractBatchOptions, MAX_BATCH_SIZE, type ValidationDispatch, type ValidationFailure, type ValidationRequestBody, validateBatchField, } from './_shared/validation'; export { jsonResponse as webJsonResponse, parseQueryParams, readJsonBody, requireJsonContentType, } from './_shared/web-helpers'; export { default as awsLambda } from './adapters/aws-lambda'; export { default as azure } from './adapters/azure'; export { default as cloudflare, PhoneValidatorDO } from './adapters/cloudflare'; export { default as gcp } from './adapters/gcp'; export { default as netlify } from './adapters/netlify'; export { default as vercel } from './adapters/vercel'; export * from './verifier';