Skip to main content
Home

Built and signed on GitHub Actions

The 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
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@deejaydev/lorem-ai

Import symbol

import * as lorem_ai from "@deejaydev/lorem-ai";
or

Import directly with a jsr specifier

import * as lorem_ai from "jsr:@deejaydev/lorem-ai";

Add Package

pnpm i jsr:@deejaydev/lorem-ai
or (using pnpm 10.8 or older)
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
or (using Yarn 4.8 or older)
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";