UNPKG

@vim-crouwel/cfpc

Version:

TypeScript library for calculating CO2 emissions from food, energy, and transportation

28 lines (27 loc) 936 B
import type { FoodCategory } from "../types/food"; /** * Calculate CO2 emissions for food consumption * @param category - Food category * @param label - Specific food item * @param kg - Weight in kilograms * @returns CO2 emissions in kg */ export declare function co2PerKg(category: keyof FoodCategory, label: string, kg: number): number; /** * Get data source for a specific food item * @param category - Food category * @param label - Specific food item * @returns Data source reference */ export declare function dataSource(category: keyof FoodCategory, label: string): string; /** * Get all available food categories * @returns Array of food category names */ export declare function getFoodCategories(): string[]; /** * Get all food items in a specific category * @param category - Food category * @returns Array of food item names */ export declare function getFoodItems(category: keyof FoodCategory): string[];