1.0.4 • Published 6 years ago

memejsfork v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

memejs

Get the best memes with ease! This npm module is a fork of (this)https://github.com/shadowolfyt/memejs repository.

Installation

npm install memejsfork --save

Current Subreddits

crappydesign
dankmemes
me_irl
wholesomememes
blackmagicfuckery
OffensiveMemes
cringepics
Unexpected
memes
technicallythetruth
2meirl4meirl
ShittyLifeProTips
AnAttemptWasMade
facepalm
iamverysmart
quityourbullshit

Usage

To get the full JSON output:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data);
});

To get the meme title:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.title[0]);
});

To get the meme url:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.url[0]);
});

To get the author:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.author[0]);
});

to get the subreddit:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.subreddit[0]);
});

To get the time the meme was created:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.created[0]);
});

To get the UTC time the meme was created:

const meme = require('memejsfork');

meme(function(data, err) {
  if (err) return console.error(err);
  console.log(data.created_utc[0]);
});

To filter subreddits:

const meme = require('memejsfork`');

meme('crappydesign', function(data, err) {
  if (err) return console.error(err);
  console.log(data);
});
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago