ngneat/falso

Update randUser to use same name to generate username & email

Closed this issue · 1 comments

Description

Current response:

{
  id: 'ac86aacc-018b-4f2c-a66a-e616a601d14f',
    email: 'david-birgisson170@sfr.biz',
    firstName: 'Rattana',
    lastName: 'König',
    phone: '+354 573 2386',
    img: 'https://i.pravatar.cc/100',
    username: 'Jose-Luis_Díaz63',
    address: {
      city: 'Farmington',
      street: '384 Jazmyn Isle',
      zipCode: '39332-1867'
  }
}

Suggested response:

{
  id: 'ac86aacc-018b-4f2c-a66a-e616a601d14f',
    email: 'david-birgisson170@sfr.biz', // <-
    firstName: 'David', // <-
    lastName: 'Birgisson', // <-
    phone: '+354 573 2386',
    img: 'https://i.pravatar.cc/100',
    username: 'David_Birgisson63', // <-
    address: {
      city: 'Farmington',
      street: '384 Jazmyn Isle',
      zipCode: '39332-1867'
  }
}

Proposed solution

Allow firstName & lastName to be passed to randEmail & randUserName (Both as optional options)

Alternatives considered

No response

Do you want to create a pull request?

Yes

Cool