Giter Site home page Giter Site logo

nothingbeatsthebell's Introduction

Nothing Beats The Bell

Downloads

A node package made purely for fun, and the desire to Live Mas® in all aspects of life. I make no claims that this is using best practices as I am constantly learning what those are. If you would like to contribute to this package, please let me know.

Install using npm:

$ npm install nothing-beats-the-bell

Basic Examples:

var NBTB = require('nothing-beats-the-bell')

var myTaco = NBTB.getTaco()

console.log(myTaco) //this will output a random taco from Taco Bell's Taco specific menu.

If you would like to get a specific item use any of the following:

.getItem('itemName') //this can grab any menu item
.getTaco('itemname') //this will only search through the Tacos
.getBurrito('itemname') //this will only search through the Burritos

An upcoming feature I would like to implement is Regex matching on item names, so you don't have to get it exactly right. As it stands right now you have to get the name exact to find your specific item. Any misspellings will result in grabbing a random item off your specified menu instead.

To find out how much your particular item will cost you, or how much it will expand your waistline:

var myTaco = NBTB.getTaco()

var myTacoCalories = NBTB.getCalories(myTaco) //.getCalories('itemName') will also work

var myTacoPrice = NBTB.getPrice(myTaco) //.getPrice('itemName') will also work

If you would like all of Taco Bell's many offerings:

var allItems = NBTB.getAll()

//output:
[
    {
        "Menu": "new",
        "Item": "Toasted Cheddar Chalupa Box",
        "Price": "$5.00",
        "Calories": "1110 Cal"
    },
    {
        "Menu": "tacos",
        "Item": "Soft Taco",
        "Price": "$1.29",
        "Calories": "180 Cal"
    },...
]

To create your own "order" there is a creatOrder method to utilize. The naming is the exact same as the currently supported menus, without the "get":

var order = NBTB.createOrder;

var myOrder = {
    Burrito: order.Burrito(),
    Taco: order.Taco()
    //etc...
    
}

Last, but certainly not least, for those who truly want to Live Mas®

var livingMas = NBTB.liveMas();

Currently Supported Menus

//New and rotating items
.getNew()
//Drinks
.getDrink()
//Tacos and Taco Party Packs
.getTaco()
//Entrees - Tacos, Quesadillas, Burritos, Nachos, and Specialites
.getEntree()
//Burritos
.getBurrito()
//Cravings Value Menu
.getValue()
//Vegitarian Menu Items
.getVegitarian()
//Breakfast Items
.getBreakfast()

Refreshing the Menu (as of 04/07/21)

In the ./src folder is refresh.js, running this file will refresh the json file that the module is pulling from. It uses axios and cheerio to scrape Taco Bell's online menu, found here.

It would be unreasonble to assume that they (Taco Bell) will never change the layout or structure of their online menu, so attempts will be made to modify the refresh file to keep it updated. If there comes a time where this is no longer possible, the most recent version of menuItems.json will become the last version of menuItems.json.

04/07/21 - Retooled the scraper to fix the issue of the class tag on main menu items changing. refresh.js is now working again like expected.

nothingbeatsthebell's People

Contributors

jhiney avatar

Watchers

 avatar

nothingbeatsthebell's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.