{"id":13715222,"url":"https://github.com/hmontazeri/is-vegan","last_synced_at":"2026-01-18T05:23:11.594Z","repository":{"id":29124134,"uuid":"120149211","full_name":"hmontazeri/is-vegan","owner":"hmontazeri","description":"Is-Vegan helps you to find out which food ingredients are vegan / non-vegan","archived":false,"fork":false,"pushed_at":"2025-04-30T12:50:24.000Z","size":834,"stargazers_count":483,"open_issues_count":11,"forks_count":34,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-04T16:47:08.041Z","etag":null,"topics":["food","ingredients","npm","vegan"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmontazeri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-04T02:43:38.000Z","updated_at":"2025-04-30T12:50:27.000Z","dependencies_parsed_at":"2023-01-14T14:15:24.669Z","dependency_job_id":"f702c9ff-cbca-4c53-ba29-fb11a002d400","html_url":"https://github.com/hmontazeri/is-vegan","commit_stats":{"total_commits":152,"total_committers":12,"mean_commits":"12.666666666666666","dds":"0.45394736842105265","last_synced_commit":"b56029ee4844c8f6146f658f9721ce40708f2a12"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmontazeri%2Fis-vegan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmontazeri%2Fis-vegan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmontazeri%2Fis-vegan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmontazeri%2Fis-vegan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmontazeri","download_url":"https://codeload.github.com/hmontazeri/is-vegan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542061,"owners_count":21764907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["food","ingredients","npm","vegan"],"created_at":"2024-08-03T00:00:56.030Z","updated_at":"2026-01-18T05:23:11.582Z","avatar_url":"https://github.com/hmontazeri.png","language":"JavaScript","funding_links":[],"categories":["Consumption","Food-related projects","Tools","Apps and Tools"],"sub_categories":["Agriculture and Nutrition"],"readme":"[![CircleCI](https://dl.circleci.com/status-badge/img/gh/hmontazeri/is-vegan/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/hmontazeri/is-vegan/tree/master) [![npm version](https://badge.fury.io/js/is-vegan.svg)](https://badge.fury.io/js/is-vegan) [![codecov](https://codecov.io/gh/hmontazeri/is-vegan/branch/master/graph/badge.svg)](https://codecov.io/gh/hmontazeri/is-vegan)\n\n# is-vegan\n\nIs-Vegan helps you to find out which food ingredients are vegan / non-vegan. It can answer that on 1 ingredient or on a list of ingredients. It uses a 850+ entries list of non-vegan ingredients.\n\n[How to use?](#usage)\n\n## Why?\n\nWe are aware that 'veganism' and the definition of it can be a hot topic. We created the non-vegan list keeping in mind that veganism in dietary terms, it denotes the practice of dispensing with all products derived wholly or partly from animals.\n\nOur first step is the approach to help people understand, which products, and where applicable its ingredients, do not involve, or have involved, the use of any animal product, by-product or derivative. It is not driven about any vegan lifestyle choice or stereotype.\nWe welcome and appreciate any help and concerence regarding the nonvegan/canbevegan list.\n\nCurrently we are unfortunatly not adressing any other forms of exploitation of, and cruelty to, animals for clothing, cosmetics or any other purpose.\n\n**Thank you all for your comments, we appreciate the discussion, as we grow and learn from your input.**\n\n[All comments on Hacker News](https://news.ycombinator.com/item?id=16316140)\n\n## Sources\n\nWe want to make sure that you understand how is-vegan is implemented. We analyzed as many good information websites for vegan / non-vegan ingredients as we found to get a very accurate list of ingredients. **However, feel free to send a pull request with an updated version of the list.**\n\nWebsites we parsed:\n\n- [veganpeace](http://www.veganpeace.com/ingredients/ingredients.htm)\n- [peta](https://www.peta.org/living/food/animal-ingredients-list/)\n- [veganwolf](http://www.veganwolf.com/animal_ingredients.htm)\n- [happycow](https://www.happycow.net/files/ingredients-to-avoid.pdf)\n\n**and we added also a few ourselves...**\n\n## Usage\n\n### Add\n\n```bash\nyarn add is-vegan\n```\n\nor\n\n```bash\nnpm install is-vegan --save\n```\n\n### Available Languages\n\nThe library supports the following languages using ISO 639-1 codes:\n\n- **en** - English (default)\n- **it** - Italian  \n- **es** - Spanish\n- **fr** - French\n- **de** - German\n\n### example\n\n```javascript\nconst isVegan = require('is-vegan');\n\n// or\n\nimport * as isVegan from 'is-vegan';\n\n// example for single ingredient\nisVegan.isVeganIngredient('soy'); // true\nisVegan.isVeganIngredient('milk'); // false\n\n// example for list of ingredients\nisVegan.isVeganIngredientList(['aspic', 'albumin']); // false\nisVegan.isVeganIngredientList(['soy', 'cacao butter']); // true\n\n// example for list of ingredients\nisVegan.containsNonVeganIngredients(['aspic', 'albumin', 'soy']); // ['aspic', 'albumin']\nisVegan.containsNonVeganIngredients(['soy', 'cacao butter']); // []\n\n// example for list of ingredients wich contain flagged and non-vegan ingredients\nisVegan.checkIngredients(['soy', 'cacao butter', 'pork', 'beef', 'glycine']);\n// returns\n// {\n//   nonvegan: ['pork', 'beef'],\n//   flagged: ['glycine']\n// }\n\n// example for list of ingredients in Italian language\nisVegan.setIngredientsLanguage('it'); // 'it' is the two-letter ISO 639-1 code for the Italian language\nisVegan.checkIngredients([\n  'manzo',\n  'maiale',\n  'glicina',\n  'biotina',\n  'soia',\n  'aglio',\n]);\n// returns\n// {\n//   nonvegan: ['manzo', 'maiale'],\n//   flagged: ['glicina', 'biotina']\n// }\n\n// example for list of ingredients in Spanish language\nisVegan.setIngredientsLanguage('es'); // 'es' is the two-letter ISO 639-1 code for the Spanish language\nisVegan.checkIngredients([\n  'carne de res',\n  'cerdo',\n  'glicina',\n  'soja',\n  'ajo',\n]);\n// returns\n// {\n//   nonvegan: ['carne de res', 'cerdo'],\n//   flagged: ['glicina']\n// }\n\n// example for list of ingredients in French language\nisVegan.setIngredientsLanguage('fr'); // 'fr' is the two-letter ISO 639-1 code for the French language\nisVegan.checkIngredients([\n  'bœuf',\n  'porc',\n  'glycine',\n  'soja',\n  'ail',\n]);\n// returns\n// {\n//   nonvegan: ['bœuf', 'porc'],\n//   flagged: ['glycine']\n// }\n\n// example for list of ingredients in German language\nisVegan.setIngredientsLanguage('de'); // 'de' is the two-letter ISO 639-1 code for the German language\nisVegan.checkIngredients([\n  'rindfleisch',\n  'schwein',\n  'glyzin',\n  'soja',\n  'knoblauch',\n]);\n// returns\n// {\n//   nonvegan: ['rindfleisch', 'schwein'],\n//   flagged: ['glyzin']\n// }\n\n// or\n\nimport { checkIngredients } from 'is-vegan';\n\n// example for list of ingredients wich contain flagged and non-vegan ingredients\ncheckIngredients(['soy', 'cacao butter', 'pork', 'beef', 'glycine']);\n\n// returns\n// {\n//   nonvegan: ['pork', 'beef'],\n//   flagged: ['glycine']\n// }\n```\n\n### real world example\n\n[Products searched on USDA Food Composition Databases](https://ndb.nal.usda.gov/ndb/search/list)\n\n```javascript\nconst isVegan = require('is-vegan');\n\n// MOSER ROTH, DARK CHOCOLATE\nisVegan.isVeganIngredientList([\n  'COCOA LIQUOR',\n  'SUGAR',\n  'COCOA BUTTER',\n  'ALKALIZED REDUCED FAT COCOA POWDER',\n  'SOY LECITHIN EMULSIFIER',\n  'GROUND VANILLA',\n]); // returns true\n```\n\nCheckout: [RunKit \"is-vegan-playground\" for more examples](https://runkit.com/hmontazeri/is-vegan-playground)\n\n## Test\n\n```bash\nyarn test\n```\n\n## Updating and translating the lists\n\nThe canbevegan and nonvegan English lists are located in the [i18n/en](./src/i18n/en/) directory. The ingredients in these English lists are sorted in alphabetical order.\n\nThe lists' translations are located in the corresponding language directory under [i18n](./src/i18n/). The ingredients in these Non-English lists are not sorted in alphabetical order, instead they maintain the order of the English lists.\\\nSo if, for example, the \"biotin\" ingredient is positioned at line 16 in the [English canbevegan](./src/i18n/en/canbevegan.json) list, then its corresponding translation \"biotina\" in the [Italian canbevegan](./src/i18n/it/canbevegan.json) list should also be positioned at line 16.\\\nIf the \"bacon\" ingredient is positioned at line 49 in the [English nonvegan](./src/i18n/en/nonvegan.json) list, then its corresponding translation \"pancetta\" in the [Italian nonvegan](./src/i18n/it/nonvegan.json) list should also be positioned at line 49.\n\n### Steps to add a new ingredient to the lists\n\n1. Add the ingredient to the canbevegan or nonvegan English list, ensuring that the list alphabetical order is preserved.\n2. Add the translated ingredient to each of the existing Non-English lists at the same line number as the ingredient appears in the corresponding English list.\n\n### Steps to translate the lists to a new language\n\n1. Create a directory with the two-letter code (ISO 639-1) of the new language.\n2. Translate the English lists to the new language and save these to newly created list files under the new language directory. Ensure that the ingredients in each of these new list files appear in the same order as in the corresponding English list.\n\n## Thanks for translating the lists to italian\n\n[gianantoniopini](https://github.com/gianantoniopini)\n\n## Alfred Workflow by Kyle Brumm (kjbrum)\n\n[alfred-is-vegan](https://github.com/kjbrum/alfred-is-vegan)\n\n## TODO\n\n- extend list\n\n## Authors\n\n- Hamed Montazeri\n- Meike Rittmeier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmontazeri%2Fis-vegan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmontazeri%2Fis-vegan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmontazeri%2Fis-vegan/lists"}