Nickname generator - French version only
Combine words to create a unique nickname.
Inspired by Xbox Live Gamertag's generator.
You can install it through NPM:
npm install nickname-generator
const generator = require('nickname-generator');
const nickname = generator.randomNickname();
const nickname = generator.randomNickname({ locale: 'fr', separator: '-', suffixLength: 0 });
randomNickname method can take an optional object parameter with these attributes:
numberOfWords: (int) number of words to combine suffixLength: (int) number of random digits to append includes: (array of categories) categories to includes. Generator will randomly pick up words from these categories. A nickname can't be composed with multiple words from the same category. locale: (string) language to use for the words. Supported languages are: 'en', 'fr' separator: (string) separator between words. Any character(s) wordCase: (string) case to use between 'lower', 'upper', 'camelCase', 'hungarian'
Category | Description |
---|---|
fruits | List of fruits |
animals | List of animals |
flowers | List of flowers |
instruments | List of music instruments |
objects | List of daily life objects |
clothes | List of clothes and accessories |
body | List of b ody parts |
weather | List of weather-related words |
games | List of game-related words |
sports | List of sport-related words |
jobs | List of jobs |
adjectives | List of neutral adjectives |
video_games | List of videogame-related words |
If no argument is provided to randomNickname, it will use the default parameters :
const defaultParams = { // Categories to include. Empty array or null will includes everything includes: [], // Number of digits at the end of the nickname suffixLength: 2, // Number of words to combine numberOfWords: 2 // The language to use for the words. Only supports English ('en') and French ('fr') locale: constants.locales.en, // Separator between words separator: '', // Case to use wordCase: constants.wordCases.camelCase }
Released under the MIT license.