Gender package provides functionality to generate a fake gender value.
npm
npm install @fakerjs/gender --save-dev
yarn
yarn add @fakerjs/gender -D
import gender from '@fakerjs/gender';
gender();
//=> Female
gender({locale: 'ru_RU'});
//=> Женский
gender({extra: ['Gender'], locale: 'en_US'});
//=> Gender
// Allowed extra: valid array
// Allowed locale: en_US, ru_RU
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko