Firstname package provides functionality to generate a fake first name value.
npm
npm install @fakerjs/firstname --save-dev
yarn
yarn add @fakerjs/firstname -D
import firstName from '@fakerjs/firstname';
firstName();
//=> Lia
firstName({locale: 'en_US', gender: 'female'});
//=> Liana
// Allowed gender: male, female
// Allowed locale: en_US, ru_RU, pl_PL, uk_UA, it_IT, de_DE, fr_FR
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko