1.0.0 • Published 1 month ago

memegen-m2k v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Memegen

Generate Memes with the help of API Meme Meme Generator. Support the official API website here.

Installation

npm i memegen-m2k --save

or

yarn add memegen-m2k

How to use

Import Library

const MemeGen = require('memegen-m2k');

Get All the meme options

console.log(MemeGen.getMemeOptions().length)

Generate Meme Image URL

const list = MemeGen.getMemeOptions();
const index = parseInt(Math.random() * list.length);
const meme = list[index]; // Pick one at random 

// top and bottom text of the meme
const topText = "When she says no"
const topBottom = "When he says no" 

// print out image link of the meme
console.log(MemeGen.generate(meme, topText, topBottom))
1.0.0

1 month ago