Skip to content

Instantly share code, notes, and snippets.

@JoepKockelkorn
Created September 24, 2022 17:17
Show Gist options
  • Save JoepKockelkorn/d6df7017f959e93e62ec4760d63d315a to your computer and use it in GitHub Desktop.
Save JoepKockelkorn/d6df7017f959e93e62ec4760d63d315a to your computer and use it in GitHub Desktop.
// Name: Lorem Ipsum
// Description: Generate lorem ipsum to clipboard
/** @type {import("@johnlindquist/kit")} */
/** @type {import("lorem-ipsum")} */
const { loremIpsum } = await npm("lorem-ipsum");
const types = ["paragraph", "sentence", "word"];
const type = await arg("Which type?", types);
const count = await arg({ description: "Count?", type: "number" });
const result = loremIpsum({
count: Number(count),
units: type,
format: "plain",
});
copy(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment