Package Exports
- memegen-techstack
- memegen-techstack/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (memegen-techstack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
How To Use memegen-techstack
Typescript
import { MemeGen } from "memegen-techstack";Javascript
const { MemeGen } = require("memegen-techstack");Get Random Memes
Example
const memeGen = new MemeGen();
const meme = await memeGen.random.fetch();
memewill return:
- HDPreview
- string - Author
- string - NSFW
- boolean - Preview
- array - Spoiler
- boolean - Title
- string - URL
- string
Each time you use
.random.fetch()you will get a different meme.
Search For A Meme From Your Input Phrase
Using Reddit API
Example
const memeGen = new MemeGen();
const meme = await memeGen.reddit.fetch({ query: "", sort: "" });
memewill return.memeseither an array or a string if no memes found for the search input.
.memes array is consists of:
- title
- string - url
- string
Using Giphy API
Example
const memeGen = new MemeGen();
const meme = await memeGen.giphy.fetch({
giphyApiKey: "apikey",
query: "",
limit: 1,
});
memewill return.memesif limit greater than 1..title&.imageURLwill return null.
memewill return.title&.imageURLif limit is 1..memeswill return null.
NOTE: The .memes will return and array with object(s):
- title
- string - imageURL
- string