BjsMenu.Nutrition 1.0.0

dotnet add package BjsMenu.Nutrition --version 1.0.0
                    
NuGet\Install-Package BjsMenu.Nutrition -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BjsMenu.Nutrition" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BjsMenu.Nutrition" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BjsMenu.Nutrition" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BjsMenu.Nutrition --version 1.0.0
                    
#r "nuget: BjsMenu.Nutrition, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BjsMenu.Nutrition@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BjsMenu.Nutrition&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BjsMenu.Nutrition&version=1.0.0
                    
Install as a Cake Tool

BjsMenu.Nutrition

Total the calories, protein, carbs, fat and sodium of a BJ's Restaurant & Brewhouse meal, offline. Pick a main, sides, drinks and desserts (with quantities) and get meal totals, the allergens in the meal, and a clear flag on every item that has no published value, so a total is never silently low.

The bundled menu has 183 items (132 with published nutrition). Items listed only per slice, and items with no published value, are not added to a total; the total is shown with a + and the items are named. Unknown allergen info never passes an allergen filter.

Install

dotnet add package BjsMenu.Nutrition

Library

using BjsMenu.Nutrition;

var meal = new Meal().Add("BJ's Wagyu Burger").Add("2x Avocado Egg Rolls");
foreach (var (nutrient, total) in meal.Totals())
    Console.WriteLine($"{nutrient}: {total.Format()}");   // Calories: 3,210 cal
Console.WriteLine(string.Join(", ", meal.Allergens));

var light = Menu.Filter(maxCalories: 600, without: new[] { "Milk" }, role: Role.Main);

A small CLI lives in cli/ of the source repo: dotnet run --project cli -- total "BJ's Wagyu Burger" "2x Avocado Egg Rolls".

How totals work

  • 2x Name sets a quantity (1-99).
  • A name can be the item id, the exact name, or words that match exactly one item; an ambiguous query such as burger is an error that lists the matches.
  • A nutrient with no published value, or an item listed per slice, is skipped and named in missing; the formatted total ends with +. If no item in the meal has the value, it reads Not listed.

Notes

Values are as published by the restaurant and can change; check with your server about allergies. Unofficial; not affiliated with BJ's Restaurants, Inc.

Licence

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 87 10/30/2026