JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 353
  • Score
    100M100P100Q99506F
  • License MIT

Representations of columns (as factors and units) in Indian Food Composition Tables 2017.

Package Exports

  • @ifct2017/representations
  • @ifct2017/representations/corpus

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ifct2017/representations) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Representations of columns (as factors and units) in Indian Food Composition Tables 2017.

const representations = require('@ifct2017/representations');
// representations.corpus: Map {column_code => {type, factor, unit}}
// representations.load(): true (corpus loaded)
// representations.sql([table], [options]): sql commands
// representations.csv(): path to csv file
// representations(<query>)
// -> {type, factor, unit} if found, null otherwise


representations.load();
/* load corpus first */

representations('his');
representations('Histidine');
// { type: 'mass', factor: 1, unit: 'g' }

representations('representation of vitamin d?');
representations('what is unit of cholecalciferol?');
// { type: 'mass', factor: 1000000, unit: 'ug' }


// ->
// type:   Type of physical quantity
// factor: Multiplication factor for representation
// unit:   Unit for representation

ifct2017

You can ask about composition of 528 key foods in India here: ifct2017.github.io.
Food composition values were measured by National Institute of Nutrition, Hyderabad.