yourmama

1.1.0 • Public • Published

yourmama package

Node.js Package

My first really stupid npm package.

Promise based yomama joke getting package. Just in case you need to have access to mom-roasting things while working offline. I used Josh Buchea's wonderful repo as source of the yomama jokes. You can find my fork here, if you want to contribute to the file.

Why did I make this? I was really bored and searched for excuses to learn how to use Mocha.js and how to make packages. I only spent one hour on this.

Usage (dont)

Install the package first:

npm i yourmama
//import it
import * as yourmama from 'yourmama';

//getting random jokes
const randomJoke = yourmama.getRandom().then(roast=>{return roast})
//Omitting params on .getRoast() returns a random roast as well.
const randomJoke = yourmama.getRoast().then(roast=>{return roast})

//get a random joke in a topic
//topic can be: fat, short, stupid, ugly, nasty, hairy, bald, old, poor, skinny, tall and nice
const fatJoke = yourmama.getTopic("fat").then(roast=>{return roast})
//if you want to use .getRoast()
const fatJoke = yourmama.getRoast({topic:'fat'}).then(roast=>{return roast}) 
 
//get by ID, just makes a giant array and selects one of them
const specificJoke = yourmama.getID(0).then(roast=>{return roast})
//if you want to use .getRoast();
const speficicJoke = yourmama.getRoast({id:0}).then(roast=>{return roast})
//returns "Yo mama is so fat that her bellybutton gets home 15 minutes before she does." 
 
//get a specific one out of the topic array
const firstFatJoke = yourmama.getRoast({topic:'fat',id:0}).then(roast=>{return roast}) 
//returns "Yo mama is so fat that her bellybutton gets home 15 minutes before she does." 

Contributing

Fork and merge request the repo. You can do whatever to improve it.

If there are (somehow) any issues, let me know on the repository.

Changes

Version 1.1.0

Changed to ES6 syntax! You should probably update your stuff or stay on 1.0.6 if you don't want to use ES6.

Otherwise, nothing changed.

Version 1.0.6

Added a few more jokes and removed the unneeded submodule.

I can't really be bothered that much to implement the new way of requiring/importing modules at the moment.

Version 1.0.4

Added some JSDocumentation to help out Intellisense and fixed typos. Otherwise, it's the exact same as v1.0.3.

License

This project uses the MIT License, read more here

Package Sidebar

Install

npm i yourmama

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

83.9 kB

Total Files

8

Last publish

Collaborators

  • jessestorms