Utility libraries to help categorize ingredients based on their sources (vegan, vegetarian, and others). The library consists of:
-
categorize(ingList, ingDict, option)
: CategorizeingList
(array of string) based oningDict
dictionary (expected to have the same structure asingspect-dict
'singDict
) with optionaloption
.
You can use IngSpect lib as follow:
import { categorize } from "ingspect-lib";
import ingDict from "ingspect-dict";
categorize([sugar, carrot, salt], ingDict, { minSimilarity: 0.8 });
In the package directory, you can run:
Run the test.
Run the test in CI mode with coverage generation.
Build the package.