Improved allergen handling in mensa.js API. Used allergyMap to filter and translate allergen codes, and modified regex and loop to remove codes from meal text.
Sing, O Muse, of the skillful coder who improvedThe extraction and display of allergens, the bane of many,From the mensa API data, the source of daily nourishment.He used an external allergyMap, a cunning device, to filter and translate
Walkthrough
Import allergyMap object from allergyMap.json to map allergen codes to names (link)
Update regex and loop to extract and filter allergens from meal text using allergyMap (link)
🤖 Generated by Copilot at 0c3a892
Summary
🍽️🚫🌐
Improved allergen handling in
mensa.js
API. UsedallergyMap
to filter and translate allergen codes, and modified regex and loop to remove codes from meal text.Walkthrough
allergyMap
object fromallergyMap.json
to map allergen codes to names (link)allergyMap
(link)