generatePixKey function exported ✓ 100.0%
Last updated: 2026-02-24T21:07:57.529Z
Location
Metrics
LOC: 15
Complexity: 5
Params: 0
Coverage: 100.0% (7/7 lines, 21x executed)
Signature
generatePixKey(): : string
Summary
Generates a random PIX key (CPF, email, phone, or UUID format).
Tags
#@returns A randomly typed PIX key string
Source Code
export function generatePixKey(): string {
const types = ["cpf", "email", "phone", "random"] as const;
const type = faker.helpers.arrayElement(types);
switch (type) {
case "cpf":
return faker.string.numeric(11);
case "email":
return faker.internet.email();
case "phone":
return `+55${faker.string.numeric(11)}`;
case "random":
return faker.string.uuid();
}
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| GeneratorFn | calls |