npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yahbuhnoh

v1.0.6

Published

A little module for asking questions

Downloads

26

Readme

yahbuhnoh

When you just want someone to answer a question and they go like... yah... buh noh... buh yah... buh noh...

Don't put any effort in it and install me.

Vicky Pollard (Little Britain)

[source] (https://67.media.tumblr.com/f26db6b54d558bf6559a6c7eed897d15/tumblr_mnen79fdF81ssumklo1_500.gif)

install

npm install yahbuhnoh

##import

const ask = require('yahbuhnoh'); //this seems the most clear and practical
//or yahbuhnoh = require('yahbuhnoh');
//or yn = require('yahbuhnoh');
//or whateverrowsyourboat = require('yahbuhnoh');

##usage

ask(question, positive, negative, wrong).then(outcome){
  //work with the outcome boolean
};

###parameters

question string - The question parameter is the question you want to ask. When only passing this the default values for the optional parameters positive, negative and wrong are used.

###optional: positive string - The answer that the user to indicate positive feedback. (not case sensitive)

negative string - The answer that the user to indicate negative feedback. (not case sensitive)

wrong string - The response a user will get when entering a value other than the given/default positive/negative upon the user will be given another try. tip: could be used to explain more if your users are... you know

###return reply object (fields: outcome boolean) - The reply with an outcome field.

###example

/*jshint esversion: 6 */
/*jslint node: true */

const ask = require('yahbuhnoh');

let flockOfSeaguls = true;

start();

function start() {
    ask("Do you want to run pulp?").then((r) => { //uses defaults Y/n
        if (r.outcome) {
            console.log('Vincent will ask you some questions is that ok?');
            askQuestions();
        } else {
            process.exit();
        }
    });
}

function askQuestions() {
    ask('What does Marcellus Wallace - look like?!', 'Euhm', 'What?', 'What he looks like!').then((r) => {
        if (r.outcome) {
            askQuestions();
        } else {
            throwTable();
            askAboutCountry();
        }
    });
}

function askAboutCountry() {
    ask('What country are you from?', 'Euhm', 'What?', 'I said... What country are you from?!').then((r) => {
        if (r.outcome) {
            askIfEnglishIsAnUnderstoodLanguage();
        } else {
            console.log('What ain\'t no country I ever heard of.');
            askIfTheySeakEnglishInWhat();
        }
    });
}

function askIfTheySeakEnglishInWhat() {
    ask('They speak English in What?!', 'Euhm', 'What?', '...').then((r) => {
        if (r.outcome) {
            askIfTheySeakEnglishInWhat();
        } else {
            askIfEnglishIsAnUnderstoodLanguage();
        }
    });
}

function askIfEnglishIsAnUnderstoodLanguage() {
    ask('English - motherfucker - Do you speak it!?', 'Yes', 'What?', 'English - motherfucker - Do you speak it!?').then((r) => {
        if (r.outcome) {
            askIfItIsUnderstoodWhatIsBeingSaid();
        } else {
            askIfEnglishIsAnUnderstoodLanguage();
        }
    });
}

function askIfItIsUnderstoodWhatIsBeingSaid() {
    ask('Then you know what I\'m saying?', 'Yes', 'What?', 'Do you!?').then((r) => {
        if (r.outcome) {
            askToDescribeBoss();
        } else {
            askIfEnglishIsAnUnderstoodLanguage();
        }
    });
}

function askToDescribeBoss() {
    ask('Describe what Marcellus Wallace looks like!', 'Black', 'Whaaat?', 'What he looks like!').then((r) => {
        if (r.outcome) {
            askToContinueDescribingBoss();
        } else {
            askSayWhatAgainSarcasticly();
        }
    });
}

let sayWhatAgainQuestion = 'Say what again! SAY - WHAT - AGAIN! I dare you, I double dare you mothafucka, say what one more gaddamn time!';

function askSayWhatAgainSarcasticly() {
    ask(sayWhatAgainQuestion, 'He\'s black', 'Whaaat?', 'What he looks like!').then((r) => {
        if (r.outcome) {
            askToContinueDescribingBoss();
        } else {
            if (flockOfSeaguls) {
                shootFlockOfSeaguls();
                sayWhatAgainQuestion = 'Your next what will be your last what motherfucker! What does Marcellus look like!';
            } else {
                shootBrett();
            }
            askSayWhatAgainSarcasticly();
        }
    });
}

function askToContinueDescribingBoss() {
    ask('Go on!', 'He\'s bald', 'Whaaat?', 'What he looks like!').then((r) => {
        if (r.outcome) {
            askIfBossLooksLikeABitch();
        } else {
            askSayWhatAgainSarcasticly();
        }
    });
}

function askIfBossLooksLikeABitch() {
    ask('Does he look like a bitch?', 'No!', 'What?', 'Does he look like one?!').then((r) => {
        if (r.outcome) {
            askWhyBossIsBeingThreatedLikeABitch();
        } else {
            shootBrettInTheShoulder();
            askWhyBossIsBeingThreatedLikeABitch();
        }
    });
}

function askWhyBossIsBeingThreatedLikeABitch() {
    ask('Then why you try to fuck him like a bitch Brett???', 'Cuz I can', 'I didn\'t', 'Why\'d you fuck em?!').then((r) => {
        if (r.outcome) {
            shootBrett();
        } else {
            console.log('Yes you diiid!... YES YOU DID BRETT!');
            console.log('You tried to fuck him...');
            console.log('but Marcellus Wallace don\'t like to be fucked by anybody except misses Wallace.');
            askIfPersonReadsBible();
        }
    });
}

function askIfPersonReadsBible() {
    ask('You read the Bible Brett?', 'yes', 'no', 'Do you read it?').then((r) => {
        if (r.outcome) {

        } else {

        }
        console.log('Do you read the Bible, Brett? Well there’s this passage I’ve got memorized – sort of fits this occasion. Ezekiel 25:17.');
        console.log('The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother’s keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the LORD when I lay my vengeance upon thee.');
        aLottaShots();
    });
}

function throwTable() {
    console.log('*a table flies through the room*');
}

function shootFlockOfSeaguls() {
    console.log('*flock of seaguls lying in the couch gets a bullet stone cold*');
    flockOfSeaguls = false;
}

function shootBrettInTheShoulder() {
    console.log('*BAM you get shot in the shoulder*');
}

function shootBrett() {
    console.log('*you get shot in the face... you dead Brett, you dead*');
    process.exit();
}

function aLottaShots() {
    let millis = 0;
    for (let i = 0; i < 10; i++) {
        console.log('BANG');
    }
    process.exit();
}

Vincent - Say What Again (Pulp Fiction)

[source] (https://m.popkey.co/666324/Lm5b6.gif)