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

2.0.8 • Public • Published

Uniquely identifiable codes for each food.
📦 Node.js, 📜 Files.

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


const codes = require('@ifct2017/codes');
// codes(query)
// → matches [{name, code}]


await codes.load();
/// Load corpus first

codes('mango green');
codes('Raw mango');
// [ { name: 'Mango, green, raw (Common)', code: 'D057' } ]

codes('what is food code of atta?');
codes('atta code');
// [ { name: 'Atta (H., P.)', code: 'A019' },
//   { name: 'Gahama atta (O.)', code: 'A019' },
//   { name: 'Wheat flour, atta (Common)', code: 'A019' } ]
// Additional methods:
codes.load() // → corpus (promise)
codes.sql([table], [options]) // → sql statements (promise)
codes.csv() // → path of csv file



ORG DOI

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.

Package Sidebar

Install

npm i @ifct2017/codes

Weekly Downloads

47

Version

2.0.8

License

MIT

Unpacked Size

83.7 kB

Total Files

6

Last publish

Collaborators

  • wolfram77