yahbuhnoh

    1.0.6 • Public • Published

    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

    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

    Install

    npm i yahbuhnoh

    DownloadsWeekly Downloads

    5

    Version

    1.0.6

    License

    ISC

    Last publish

    Collaborators

    • dmg_