"code":"// Set of 20 first names for companies\nconst firstCompanyNames = [\n \"Alpha\",\n \"Beta\",\n \"Gamma\",\n \"Delta\",\n \"Omega\",\n \"Nova\",\n \"Zenith\",\n \"Spectrum\",\n \"Horizon\",\n \"Apex\",\n \"Vertex\",\n \"Pinnacle\",\n \"Infinite\",\n \"Eclipse\",\n \"Nimbus\",\n \"Quantum\",\n \"Orbit\",\n \"Aurora\",\n \"Vortex\",\n \"Cascade\",\n];\n\n// Set of 20 second names for companies\nconst secondCompanyNames = [\n \"Technologies\",\n \"Solutions\",\n \"Innovations\",\n \"Systems\",\n \"Enterprises\",\n \"Global\",\n \"International\",\n \"Group\",\n \"Consulting\",\n \"Services\",\n \"Dynamics\",\n \"Digital\",\n \"Networks\",\n \"Ventures\",\n \"Partners\",\n \"Enterprises\",\n \"Solutions\",\n \"Industries\",\n \"Labs\",\n \"Strategies\",\n];\n\n// Array to hold generated company names\nconst companyNames = [];\n\n// Loop to generate specified count of company names\nfor (let i = 0; i < parameters.count; i++) {\n // Retrieve a random first name from the firstCompanyNames array\n await queries.getRandomItem.run({ arr: firstCompanyNames });\n let firstName = `${queries.getRandomItem.getData()}`;\n\n // Retrieve a random second name from the secondCompanyNames array\n await queries.getRandomItem.run({ arr: secondCompanyNames });\n let secondName = `${queries.getRandomItem.getData()}`;\n\n // Concatenate first and second names to form a company name\n let companyName = `${firstName} ${secondName}`;\n\n // Add generated company name to the array\n companyNames.push(companyName);\n}\n\n// Join the generated company names into a comma-separated string and return\nreturn companyNames.join(\", \");",
"code":"// Set of 20 first names for companies\nconst firstCompanyNames = [\n \"Alpha\",\n \"Beta\",\n \"Gamma\",\n \"Delta\",\n \"Omega\",\n \"Nova\",\n \"Zenith\",\n \"Spectrum\",\n \"Horizon\",\n \"Apex\",\n \"Vertex\",\n \"Pinnacle\",\n \"Infinite\",\n \"Eclipse\",\n \"Nimbus\",\n \"Quantum\",\n \"Orbit\",\n \"Aurora\",\n \"Vortex\",\n \"Cascade\",\n];\n\n// Set of 20 second names for companies\nconst secondCompanyNames = [\n \"Technologies\",\n \"Solutions\",\n \"Innovations\",\n \"Systems\",\n \"Enterprises\",\n \"Global\",\n \"International\",\n \"Group\",\n \"Consulting\",\n \"Services\",\n \"Dynamics\",\n \"Digital\",\n \"Networks\",\n \"Ventures\",\n \"Partners\",\n \"Enterprises\",\n \"Solutions\",\n \"Industries\",\n \"Labs\",\n \"Strategies\",\n];\n\n// Array to hold generated company URLs\nconst companyUrls = [];\n\n// Loop to generate specified count of company URLs\nfor (let i = 0; i < parameters.count; i++) {\n // Retrieve a random first name from the firstCompanyNames array\n await queries.getRandomItem.run({ arr: firstCompanyNames });\n let firstName = `${queries.getRandomItem.getData()}`;\n\n // Retrieve a random second name from the secondCompanyNames array\n await queries.getRandomItem.run({ arr: secondCompanyNames });\n let secondName = `${queries.getRandomItem.getData()}`;\n\n // Create a URL-friendly string by concatenating first and second names and converting to lowercase\n let urlFriendlyName = `${firstName}-${secondName}`.toLowerCase();\n\n // Construct the company URL\n let companyUrl = `https://www.${urlFriendlyName}.com`;\n\n // Add generated company URL to the array\n companyUrls.push(companyUrl);\n}\n\n// Join the generated company URLs into a comma-separated string and return\nreturn companyUrls.join(\", \");",
"code":"// Retrieve selected options from the UI\nconst datasetType = components.dataset_type.value;\nconst datasetCount = parseInt(components.dataset_count.value);\n\n// Check if datasetCount exceeds the maximum limit\nif (datasetCount > 100) {\n // Show an error alert if the maximum limit is exceeded\n actions.showAlert(\"error\", \"Maximum number of datasets is 100\");\n return;\n}\n\n// Check if datasetCount is less than or equal to zero\nif (datasetCount <= 0) {\n // Show an error alert if datasetCount is less than or equal to zero\n actions.showAlert(\"error\", \"Minimum number of datasets is 1\");\n return;\n}\n\n// Generate dummy text based on the selected dataset type\nlet generatedData;\nswitch (datasetType) {\n case \"paragraph\":\n // Generate paragraphs based on the specified count\n await queries.generateParagraphs.run({ count: datasetCount });\n generatedData = queries.generateParagraphs.getData();\n break;\n case \"sentence\":\n // Generate sentences based on the specified count\n await queries.generateSentences.run({ count: datasetCount });\n generatedData = queries.generateSentences.getData();\n break;\n case \"title\":\n // Generate titles based on the specified count\n await queries.generateTitles.run({ count: datasetCount });\n generatedData = queries.generateTitles.getData();\n break;\n case \"word\":\n // Generate words based on the specified count\n await queries.generateWords.run({ count: datasetCount });\n generatedData = queries.generateWords.getData();\n break;\n case \"fullName\":\n // Generate full names based on the specified count\n await queries.generateFullNames.run({ count: datasetCount });\n generatedData = queries.generateFullNames.getData();\n break;\n case \"email\":\n // Generate email addresses based on the specified count\n await queries.generateEmails.run({ count: datasetCount });\n generatedData = queries.generateEmails.getData();\n break;\n case \"companyURL\":\n // Generate company URLs based on the specified count\n await queries.generateCompanyUrls.run({ count: datasetCount });\n generatedData = queries.generateCompanyUrls.getData();\n break;\n case \"companyName\":\n // Generate company names based on the specified count\n await queries.generateCompanyNames.run({ count: datasetCount });\n generatedData = queries.generateCompanyNames.getData();\n break;\n}\n\n// Return the generated dummy text\nreturn { generatedData };",
"code":"// Array to hold generated sentences\nconst sentences = [];\n\n// Loop to generate specified count of sentences\nfor (let i = 0; i < parameters.count; i++) {\n // Generate a random count of words for this sentence (between 8 and 24)\n let randomCount = Math.floor(Math.random() * 17) + 8;\n\n // Generate words using the query with the random count\n await queries.generateWords.run({ count: randomCount });\n let sentence = queries.generateWords.getData();\n\n // Capitalize the first letter of the sentence and make the rest lowercase\n sentence = sentence[0].toUpperCase() + sentence.slice(1).toLowerCase();\n\n // Append punctuation to the end of the sentence\n sentence += \".\";\n\n // Append the generated sentence to the sentences array\n sentences.push(sentence);\n}\n\n// Join the generated sentences into a single string separated by spaces and return\nreturn sentences.join(\" \");",
"code":"// Generate a random index within the range of the array length\nconst randomIndex = parseInt(Math.random() * parameters.arr.length);\n\n// Return the element at the randomly generated index from the array\nreturn parameters.arr[randomIndex];",
"defaultValue":"[\n \"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.\",\n \"Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit.\"]"
"code":"// Generate a random size for each paragraph, ranging from 3 to 7 sentences\nconst randomSize = parseInt(Math.random() * 5) + 3;\n\n// Array to hold generated paragraphs\nconst paragraphs = [];\n\n// Loop to generate specified count of paragraphs\nfor (let i = 0; i < parameters.count; i++) {\n // Generate a paragraph with a random number of sentences\n await queries.generateSentences.run({ count: randomSize });\n paragraphs.push(queries.generateSentences.getData());\n}\n\n// Join the generated paragraphs into a string separated by two newlines and return\nreturn paragraphs.join(\"\\n\\n\");",
"code":"// Set of 30 words\nconst wordSet = [\n \"Lorem\",\n \"ipsum\",\n \"dolor\",\n \"sit\",\n \"amet\",\n \"consectetur\",\n \"adipiscing\",\n \"elit\",\n \"sed\",\n \"auctor\",\n \"magna\",\n \"non\",\n \"bibendum\",\n \"efficitur\",\n \"ipsum\",\n \"velit\",\n \"Suspendisse\",\n \"potenti\",\n \"Donec\",\n \"enim\",\n \"ex\",\n \"faucibus\",\n \"placerat\",\n \"Cras\",\n \"felis\",\n \"magna\",\n \"vestibulum\",\n \"commodo\",\n \"Nullam\",\n \"auctor\",\n];\n\n// Array to hold generated words\nconst words = [];\n\n// Loop to generate specified count of words\nfor (let i = 0; i < parameters.count; i++) {\n // Retrieve a random word from the wordSet array\n await queries.getRandomItem.run({ arr: wordSet });\n words.push(queries.getRandomItem.getData());\n}\n\n// Join the generated words into a single string separated by spaces and return\nreturn words.join(\" \");",
"code":"// Array to hold generated titles\nconst titles = [];\n\n// Loop to generate specified count of titles\nfor (let i = 0; i < parameters.count; i++) {\n // Generate a random count of words for this title (between 3 and 4)\n let randomCount = Math.floor(Math.random() * 2) + 3;\n\n // Generate words using the query with the random count\n await queries.generateWords.run({ count: randomCount });\n\n // Append the generated words to the titles array\n titles.push(queries.generateWords.getData());\n}\n\n// Join the generated titles into a single string separated by commas and return\nreturn titles.join(\", \");",
"code":"// Set of 20 first names\nconst firstNames = [\n \"John\",\n \"Jane\",\n \"Michael\",\n \"Emily\",\n \"David\",\n \"Emma\",\n \"Daniel\",\n \"Olivia\",\n \"James\",\n \"Sophia\",\n \"William\",\n \"Isabella\",\n \"Benjamin\",\n \"Mia\",\n \"Jacob\",\n \"Charlotte\",\n \"Ethan\",\n \"Amelia\",\n \"Alexander\",\n \"Harper\",\n];\n\n// Set of 20 last names\nconst lastNames = [\n \"Smith\",\n \"Johnson\",\n \"Williams\",\n \"Jones\",\n \"Brown\",\n \"Davis\",\n \"Miller\",\n \"Wilson\",\n \"Moore\",\n \"Taylor\",\n \"Anderson\",\n \"Thomas\",\n \"Jackson\",\n \"White\",\n \"Harris\",\n \"Martin\",\n \"Thompson\",\n \"Garcia\",\n \"Martinez\",\n \"Robinson\",\n];\n\n// Array to hold generated full names\nlet fullNames = [];\n\n// Loop to generate specified count of full names\nfor (let i = 0; i < parameters.count; i++) {\n // Retrieve a random first name from the firstNames array\n await queries.getRandomItem.run({ arr: firstNames });\n let firstName = `${queries.getRandomItem.getData()}`;\n\n // Retrieve a random last name from the lastNames array\n await queries.getRandomItem.run({ arr: lastNames });\n let lastName = `${queries.getRandomItem.getData()}`;\n\n // Concatenate first and last names to form a full name\n let fullName = `${firstName} ${lastName}`;\n\n // Add generated full name to the array\n fullNames.push(fullName);\n}\n\n// Join the generated full names into a comma-separated string and return\nreturn fullNames.join(\", \");",
"code":"// Set of 20 first names for email generation\nconst firstNames = [\n \"John\",\n \"Jane\",\n \"Michael\",\n \"Emily\",\n \"David\",\n \"Sarah\",\n \"James\",\n \"Emma\",\n \"Daniel\",\n \"Olivia\",\n \"Christopher\",\n \"Sophia\",\n \"Matthew\",\n \"Ava\",\n \"Andrew\",\n \"Isabella\",\n \"William\",\n \"Mia\",\n \"Joseph\",\n \"Charlotte\",\n];\n\n// Set of 20 last names for email generation\nconst lastNames = [\n \"Smith\",\n \"Johnson\",\n \"Brown\",\n \"Taylor\",\n \"Anderson\",\n \"Wilson\",\n \"Miller\",\n \"Davis\",\n \"White\",\n \"Clark\",\n \"Walker\",\n \"Hall\",\n \"Allen\",\n \"Young\",\n \"Hill\",\n \"Scott\",\n \"Green\",\n \"Adams\",\n \"Baker\",\n \"Ross\",\n];\n\n// Set of common email domains\nconst emailDomains = [\n \"gmail.com\",\n \"yahoo.com\",\n \"hotmail.com\",\n \"outlook.com\",\n \"icloud.com\",\n \"aol.com\",\n \"mail.com\",\n \"protonmail.com\",\n \"zoho.com\",\n \"yandex.com\",\n];\n\n// Array to hold generated email addresses\nconst emails = [];\n\n// Loop to generate specified count of email addresses\nfor (let i = 0; i < parameters.count; i++) {\n // Retrieve a random first name from the firstNames array\n await queries.getRandomItem.run({ arr: firstNames });\n let urlFriendlyfirstName =\n `${queries.getRandomItem.getData()}`.toLocaleLowerCase();\n\n // Retrieve a random last name from the lastNames array\n await queries.getRandomItem.run({ arr: lastNames });\n let urlFriendlylastName =\n `${queries.getRandomItem.getData()}`.toLocaleLowerCase();\n\n // Retrieve a random email domain from the emailDomains array\n await queries.getRandomItem.run({ arr: emailDomains });\n let domain = `${queries.getRandomItem.getData()}`;\n\n // Generate a random number for email address variation\n let randomNum = parseInt(Math.random() * 1000);\n\n // Construct the email address\n let emailAddress = `${urlFriendlyfirstName}.${urlFriendlylastName}${randomNum}@${domain}`;\n\n // Add generated email address to the array\n emails.push(emailAddress);\n}\n\n// Join the generated email addresses into a comma-separated string and return\nreturn emails.join(\", \");",