String package provides functionality to generate a fake string value.
npm
npm install @fakerjs/string --save-dev
yarn
yarn add @fakerjs/string -D
import string from '@fakerjs/string';
string();
//=> 3Kekravwvb78vP9CQPP1vaRCgi4dZETOktxzf8pF5gufFqh8mOICMqjRP4y8UxoI
string({length: 10});
//=> FxvqHNFNUu
string({length: 10, keyspace: '#@$%&+='});
//=> $+#%#&$$=@
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko