ingspect-lib
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

IngSpect Lib

Utility libraries to help categorize ingredients based on their sources (vegan, vegetarian, and others). The library consists of:

  • categorize(ingList, ingDict, option): Categorize ingList (array of string) based on ingDict dictionary (expected to have the same structure as ingspect-dict's ingDict) with optional option.

Usage

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 });

Available Scripts

In the package directory, you can run:

npm test

Run the test.

npm run test:ci

Run the test in CI mode with coverage generation.

npm run build

Build the package.

Readme

Keywords

none

Package Sidebar

Install

npm i ingspect-lib

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

195 kB

Total Files

23

Last publish

Collaborators

  • sutris