@nvif1989/codes

1.0.3 • Public • Published

Uniquely identifiable codes for each food.

This is part of package nvif1989.
Source: Nutritive Value of Indian Foods 1989.

const codes = require('@nvif1989/codes');
// codes.corpus: Map {name => {name, code}}
// codes.load(): Promise (corpus loaded)
// codes.sql([table], [options]): Promise (sql commands)
// codes.csv(): path to csv file
// codes(<query>)
// -> [{name, code}] for matched food names


async function main() {
await codes.load();
/* load corpus first */

codes('hing');
// [ { name: 'Hing (B.,G.,H.,Mar.,P.)', code: '215' } ]

codes('atta');
// [
//   { name: 'Valia atta (Mal.)', code: '384' },
//   { name: 'Atta (B.,H.,O.)', code: '21' },
//   { name: 'Am-ka-guthli-ka-atta (H.)', code: '546' }
// ]
}
main();

nvif1989

You can ask about composition of 592 key foods in India here: nvif1989.github.io.
Food composition values were measured by National Institute of Nutrition, Hyderabad.
Take a peek at the raw data here: Document, Webpage.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @nvif1989/codes

    Weekly Downloads

    0

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    87.9 kB

    Total Files

    5

    Last publish

    Collaborators

    • wolfram77