🌁 Random meme generator for Node.js, with a CLI and TypeScript types. Fetches random meme images from Lemmy meme communities, with zero dependencies.
-
🎲 Fresh memes - Random image posts from Lemmy meme communities
-
🗒️ Text and Image - Get random memes as text & image
-
💻 CLI - Run
npx random-memesto get a meme in your terminal -
📦 Zero dependencies - Uses the
fetchbuilt into Node.js, ships TypeScript types
Installation:
npm install random-memesRequires Node.js 20 or newer.
Get random meme:
const memes = require("random-memes");
const fetchMeme = async () => {
const meme = await memes.random();
console.log(meme);
};With ES modules:
import { random } from "random-memes";
const meme = await random();From the command line:
npx random-memesWarning
memes.reddit() is deprecated and will be removed in v5. Reddit blocks most unauthenticated requests, so it fails with HTTP 403 in most environments. See the changelog for everything that changed in v4.
Found a bug or have an idea? Open an issue.
Read the contributing guide before sending a pull request.
MIT LICENSE 2019-present | Halit Sever
