Skip to content

Commit

Permalink
Merge pull request #193 from luisfontes19/lorem-ipsum
Browse files Browse the repository at this point in the history
created lorem impsum script
  • Loading branch information
IvanMathy authored Mar 16, 2021
2 parents 00b63f7 + 597f6a5 commit b8c0fa4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Scripts/LoremIpsum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
{
"api":1,
"name":"Lorem Ipsum",
"description":"Generates Lorem Ipsum like text",
"author":"luisfontes19",
"icon":"type",
"tags":"generate,lorem,ipsum,text",
"bias": -0.1
}
**/


function main(state) {
const words = ["ad", "adipisicing", "aliqua", "aliquip", "amet", "anim", "aute", "cillum", "commodo", "consectetur", "consequat", "culpa", "cupidatat", "deserunt", "do", "dolor", "dolore", "duis", "ea", "eiusmod", "elit", "enim", "esse", "est", "et", "eu", "ex", "excepteur", "exercitation", "fugiat", "id", "in", "incididunt", "ipsum", "irure", "labore", "laboris", "laborum", "Lorem", "magna", "minim", "mollit", "nisi", "non", "nostrud", "nulla", "occaecat", "officia", "pariatur", "proident", "qui", "quis", "reprehenderit", "sint", "sit", "sunt", "tempor", "ullamco", "ut", "velit", "veniam", "voluptate"];
let sentence = "";

for (let i = 0; i < 100; i++) {
const pos = Math.floor(Math.random() * (words.length - 1));
sentence += words[pos] + " ";
}

sentence = sentence.charAt(0).toUpperCase() + sentence.slice(1).trim() + ".";

state.text = sentence;
}

0 comments on commit b8c0fa4

Please sign in to comment.