@napunda/pix-key-ts
Version:
Identify, validate, format and normalize a Pix key type from a string
16 lines • 524 B
TypeScript
export declare enum PixKeyType {
CPF = "cpf",
CNPJ = "cnpj",
RANDOM = "random",
EMAIL = "email",
PHONE = "phone"
}
export interface PixKeyValidationResult {
isValid: boolean;
types: PixKeyType[];
}
declare const validate: (pixKey: string) => PixKeyType[];
declare const normalize: (pixKey: string, as?: PixKeyType | null) => string | null;
declare const format: (pixKey: string, as?: PixKeyType | null) => string | null;
export { validate, normalize, format };
//# sourceMappingURL=index.d.ts.map