Skip to main content

Function: generateRandomMerchant()

@arolariu/website


@arolariu/website / data/mocks/merchant / generateRandomMerchant

Function: generateRandomMerchant()

generateRandomMerchant(): Merchant

Defined in: data/mocks/merchant.ts:392

Generates a single random Merchant with realistic data.

Returns

Merchant

A randomly configured Merchant object

Remarks

Use Cases:

  • Quick test data generation
  • Seeding development databases
  • Populating UI prototypes

Randomization:

  • All properties use faker.js for realistic values
  • Merchant categories are randomly selected
  • Addresses, phone numbers, and names are locale-appropriate

Example

const merchant = generateRandomMerchant();
// Result: {
// id: "uuid...",
// name: "Johnson Group",
// category: MerchantCategory.SUPERMARKET,
// address: "123 Oak St, Denver CO",
// ...
// }

See

generateRandomMerchants for batch generation

// was this page useful?