@deejaydev/lorem-ai@0.1.4Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
danju4rizzl/lorem-aiThe package will generate natural language placeholder text.
This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers




JSR Score
100%
Published
10 months ago (0.1.4)
Lorem AI 🤖
A lightweight package that provides a Generative AI approach to lorem ipsum. The package will generate natural language placeholder word/sentence string
for any JavaScript runtime.
📢 Heads up!!!
For now, the lib only uses the Google Gemini API key. You can get your API key here 👉🏽 Google Docs.
⬇️ Installation
Works with any JavaScript Package Manager, with a node_modules
folder.
# Bun 🔥 bunx jsr add @deejaydev/lorem-ai # Deno 🚤 deno add @deejaydev/lorem-ai # pnpm, npm, yarn 👴 pnpm dlx jsr add @deejaydev/lorem-ai
⚙️ Usage:
After adding the package in your project, you can import and use it in ES modules.
import { loremAI } from '@deejaydev/lorem-ai' ... const genWords = await loremAI('YOUR_GEMINI_API_KEY', 5) console.log(genWords) //The cat chased the mouse. ...
🦖 Code example:
Here's a full example you can use in a Bun project.
import { loremAI } from '@deejaydev/lorem-ai' const API_KEY = Bun.env.GEMINI_API_KEY async function run() { try { const sentence = await loremAI(API_KEY, 50) console.log(sentence) // random sentence with 50 words } catch (error) { console.error('Error generating sentence:', error) } } run()
Built and signed on
GitHub Actions
Add Package
deno add jsr:@deejaydev/lorem-ai
Import symbol
import * as lorem_ai from "@deejaydev/lorem-ai";
Import directly with a jsr specifier
import * as lorem_ai from "jsr:@deejaydev/lorem-ai";
Add Package
pnpm i jsr:@deejaydev/lorem-ai
pnpm dlx jsr add @deejaydev/lorem-ai
Import symbol
import * as lorem_ai from "@deejaydev/lorem-ai";
Add Package
yarn add jsr:@deejaydev/lorem-ai
yarn dlx jsr add @deejaydev/lorem-ai
Import symbol
import * as lorem_ai from "@deejaydev/lorem-ai";
Add Package
npx jsr add @deejaydev/lorem-ai
Import symbol
import * as lorem_ai from "@deejaydev/lorem-ai";
Add Package
bunx jsr add @deejaydev/lorem-ai
Import symbol
import * as lorem_ai from "@deejaydev/lorem-ai";