@rao123dk/random-username-generator
v1.0.4
Published
A utility to generate a unique/distinctive username using either an email address, randomly picked nouns and adjectives, or country-based names. Users have the option to insert a separator in the username, set the maximum length, and include up to provide
Downloads
33
Maintainers
Readme
@rao123dk/random-username-generator
A utility to generate a unique/distinctive username using either an email address, randomly picked nouns and adjectives, or country-based names. Users have the option to insert a separator in the username, set the maximum length, and include up to provided random digits.
Install
npm i @rao123dk/random-username-generator --save
yarn add @rao123dk/random-username-generator
Uses
const {
generateRandomUsername,
} = require("@rao123dk/random-username-generator");
Generate random username by email
const {
generateRandomUsername
} = require("@rao123dk/random-username-generator");
generateRandomUsername({ email: "[email protected]" });
Output: -javascriptkingdom;
Generate random username
const {
generateRandomUsername
} = require("@rao123dk/random-username-generator");
generateRandomUsername();
Output:- Groot-qualified942;
Generate random username with separator
const {
generateRandomUsername
} = require("@rao123dk/random-username-generator");
generateRandomUsername({ separator: "_" });
Output:- nasty_Ultron498;
Generates username with separator and random Digits
const {
generateRandomUsername
} = require("@rao123dk/random-username-generator");
generateRandomUsername({
randomDigits: 4,
separator: "_",
});
Output:- Clark_Dooms3457;