Skip to content

About

Random meme generator for Node.js with a CLI and TypeScript types. Fetches meme images from Lemmy communities, zero dependencies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

14 stars

Watchers

1 watching

Forks

Repository files navigation

Random Memes logo

🌁 Random meme generator for Node.js, with a CLI and TypeScript types. Fetches random meme images from Lemmy meme communities, with zero dependencies.


GitHub sponsors npm version License: MIT

Documentation

  • 🎲 Fresh memes - Random image posts from Lemmy meme communities

  • 🗒️ Text and Image - Get random memes as text & image

  • 💻 CLI - Run npx random-memes to get a meme in your terminal

  • 📦 Zero dependencies - Uses the fetch built into Node.js, ships TypeScript types

Installation:

npm install random-memes

Requires 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-memes

Warning

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

About

Random meme generator for Node.js with a CLI and TypeScript types. Fetches meme images from Lemmy communities, zero dependencies.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

14 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages