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

foodie

v1.1.1

Published

Command line interface package that finds restaurants near your location. Uses Google Maps Places and Geolocation APIs.

Downloads

35

Readme

Foodie

Foodie is the most delicious command line interface out there. Type in what you want to eat and let foodie find restaurants nearby to satisfy your cravings.

Installation

Use the package manager npm to globally install foodie.

npm install -g foodie 

Usage

This CLI package uses both the Google Geolocation API and Places API. You will need to go to the credentials section of the Google Cloud Platform. Once there, click the "Create Credentials" button, and select "API Key". This key will be used for both APIs so it must be unrestricted.

However, should you want to restrict your API key, you will need to create a second one. The package allows for an optional second API key to be incorporated, just make sure the first key is for the Geolocation API and the second is for the Places API.

If you do not include a second API key, the package will default to the first one and use it for both APIs.

The API key(s) needs to be stored in an .env file and use the below formatting.

example .env file

API_KEY = YOUR_FIRST_API_KEY
API_KEY_2 = YOUR_SECOND_API_KEY (optional)

Once this is done, you can now globally install foodie and be able to run the foodie command.

$ foodie

You will then receive a prompt, asking what kind of food you want.

What are you hungry for?

Type in a type of food you are in the mood for, like Chinese, Mexican, sushi, Indian, and more (the search is not case sensitive).

Alternatively, if you want to skip the initial prompt, you can simply write foodie FOOD_TYPE and the list will be generated in a few seconds.

You will then see a dancing 'kirby' (<('o')>) that will dance in the command line while you wait for your results are evaluated. When your are returned, you should see a list of restaurants that fall under whatever category you typed into the command line. The restaurants are ordered initially by how close they are to you. The closest restaurants will appear at the bottom of the list.

After the initial response, you will have the option to further sort your results by price, rating and distance. The price and rating sorter will alternate between cheapest/most expensive and best/worst rated. The distance sorter will always return restaurants in the order of closest to furthest away from your device's geographic location.

Below is an example of use.

Initial Prompt with Results

Initial Prompt

Initial Sort Options Initial Sort

After Sort by Rating Rating Sort Items are now sorted by rating. Notice how now the rating sort option now reads (worst). If you type in rating again it will now sort by worst rated.

Exit Exit

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT