({
take: [
{ key: "p", type: "number", max: 20, label: "Paragraphs" },
{ key: "s", type: "number", max: 20, label: "Sentences" },
{ key: "w", type: "number", max: 50, label: "Words" },
{
type: "import",
value: "https://cdn.jsdelivr.net/npm/fast-lorem-ipsum@1.2.0/dist/fli.js",
},
],
make: (data) => {
const cap = (w) => w[0].toUpperCase() + w.slice(1)
let value = ""
let words = parser(data.p * data.s * data.w, "w").split(" ")
for (let i = 0; i < data.p; i++) {
for (let j = 0; j < data.s; j++) {
value += cap(words.splice(0, data.w).join(" "))
value += ". "
}
if (i < data.p - 1) value += "\n\n"
}
value = value.replace(/\,\./g, ".")
return [{ type: "text", value }]
},
})