Generate Memes with the help of API Meme Meme Generator. Support the official API website here.
npm i memegen-m2k --save
or
yarn add memegen-m2k
const MemeGen = require('memegen-m2k');
console.log(MemeGen.getMemeOptions().length)
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))