Have ideas to improve npm?Join in the discussion! »

    @ifct2017/groups
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.4 • Public • Published

    Categorization of food by their common names.

    This is part of package ifct2017.
    Online database: ifct2017.github.io.


    const groups = require('@ifct2017/groups');
    // groups(query)
    // → matches [{code, group, entries, tags}]
    
    
    groups('cereals');
    groups('Millet');
    // [ { code: 'A',
    //     group: 'Cereals and Millets',
    //     entries: 24,
    //     tags: 'vegetarian eggetarian fishetarian veg' } ]
    
    groups('what is vegetable?');
    groups('vegetable group code?');
    // [ { code: 'D',
    //     group: 'Other Vegetables',
    //     entries: 78,
    //     tags: 'vegetarian eggetarian fishetarian veg' },
    //   { code: 'C',
    //     group: 'Green Leafy Vegetables',
    //     entries: 34,
    //     tags: 'vegetarian eggetarian fishetarian veg' } ]
    // Additional methods:
    groups.load() // → corpus
    groups.sql([table], [options]) // → sql statements
    groups.csv() // → path of csv file


    Data was obtained from the book Indian Food Composition Tables 2017.
    Food composition values were measured by National Institute of Nutrition, Hyderabad.
    Take a peek at the raw data here: Document, Webpage.

    Install

    npm i @ifct2017/groups

    DownloadsWeekly Downloads

    7

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    9.87 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar