@nvif1989/contents

Contents in the original book.

Usage no npm install needed!

<script type="module">
  import nvif1989Contents from 'https://cdn.skypack.dev/@nvif1989/contents';
</script>

README

Contents in the original book.

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

const contents = require('@nvif1989/contents');
// contents.corpus: Map {sno => {sno, title, pagenos}}
// contents.load(): true (corpus loaded)
// contents.sql([table], [options]): sql commands
// contents.csv(): path to csv file
// contents(<query>)
// -> [{sno, title, pagenos}] for matched contents


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

contents('minerals');
contents('trace elements');
// [ { sno: 'T3.',
//     title: 'Mineral and Trace Elements : Common Foods',
//     pagenos: '68-73' },
//   { sno: 'T6.',
//     title: 'Mineral and Trace Elements : Less Familiar Foods',
//     pagenos: '80' } ]

contents('what is page number of minerals in common foods?');
contents('common foods trace elements page number');
// [ { sno: 'T3.',
//     title: 'Mineral and Trace Elements : Common Foods',
//     pagenos: '68-73' } ]

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.