Skip to content

Person Module > Add sexType parameter to sex function #3567

@MH1702

Description

@MH1702

Clear and concise description of the problem

You currently cannot generate a localized sex and first name for a single person and guarantee that they match.

Suggested solution

Allow faker.person.sex() to also receive the sexType parameter ensuring the given sex but effectively localizing it.

Alternative

Alternatively there could also be a "localizer" function that takes a sexType and returns the same output the faker.person.sex function returns for the given sexType, but I personally would prefer the prior.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions