hmontazeri/is-vegan: Is-Vegan helps you to find out which food ingredients are vegan / non-vegan

05/02/2018


Is-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 the 600+ entries black list of non-vegan ingredients.

How to use?

Sources

We 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.

Websites we parsed:

and we added also a few ourselves…

Usage

Add

yarn add is-vegan

or

npm install is-vegan --save

example

const isVegan = require('is-vegan');
// or
import * as isVegan from 'is-vegan';
// example for single ingredient
isVegan.isVeganIngredient('soy'); // true
isVegan.isVeganIngredient('milk'); // false
// example for list of ingredients
isVegan.isVeganIngredientList(['aspic', 'albumin']); // false
isVegan.isVeganIngredientList(['soy', 'cacao butter']); // true
// or
import { isVeganIngredient, isVeganIngredientList } from 'is-vegan';
// example for single ingredient
isVeganIngredient('soy'); // true
isVeganIngredient('milk'); // false
// example for list of ingredients
isVeganIngredientList(['aspic', 'albumin']); // false
isVeganIngredientList(['soy', 'cacao butter']); // true

TODO

Authors

  • Hamed Montazeri
  • Meike Rittmeier

قالب وردپرس