Letter package provides functionality to generate a fake letter value.
npm
npm install @fakerjs/letter --save-dev
yarn
yarn add @fakerjs/letter -D
import letter from '@fakerjs/letter';
letter();
//=> z
letter({'casing': 'upper'});
//=> Z
letter({'casing': 'upper', 'locale': 'ru_RU'});
//=> Я
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko