ngneat/falso

Support gender for lastname / firstname generation

Closed this issue · 9 comments

Description

Would love if we can use parameter with gender in randLastName() and randFirstName():

randLastName({ gender: 'male' }); // Smith

randFirstName({ gender: 'female' }); // Emma

Proposed solution

We need to sort current first names / last names by gender in json file including option withAccents and then add parameter gender with male | female types.

@NetanelBasal how do you think about it?

Alternatives considered

No response

Do you want to create a pull request?

Yes

It seems like a nice feature.

@NetanelBasal OK I will try to prepare PR soon

My only thought is that our genders in falso are not binary. See packages/falso/src/lib/gender.json

Also, I'm not sure about in other cultures but I don't think last names are gendered?

You're right @theryansmee, I don't think the last name is relevant in this case.

@NetanelBasal @theryansmee In some cases, it's relevant. Check out Ivanova, Ivanov and etc for last names.

Yes, but I don't think it's a common use case.

@NetanelBasal OK I will add option for pass gender to lastname, but in implementation for common usecase I do nothing with it, but in i18n case I process it as needed for case I need, OK?