UNPKG

gamer-namer

Version:

Generate a random gamer-related name!

19 lines (16 loc) 481 B
"use strict"; var { adjectives, gamingTerms, nouns } = require("./data"); /** * Returns a gaming related username */ const generateName = () => { const adjective = adjectives[Math.floor(Math.random() * (adjectives.length - 1))]; const gamingTerm = gamingTerms[Math.floor(Math.random() * (gamingTerms.length - 1))]; const noun = nouns[Math.floor(Math.random() * (nouns.length - 1))]; return adjective + gamingTerm + noun; }; module.exports = { generateName };