1.0.16 • Published 4 years ago

food-e.min v1.0.16

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

E numbers are codes for substances that are permitted to be used as food additives for use within the European Union and EFTA. Commonly found on food labels, their safety assessment and approval are the responsibility of the European Food Safety Authority.

Having a single unified list for food additives was first agreed upon in 1962 with food colouring. In 1964, the directives for preservatives were added, 1970 for antioxidants and 1974 for the emulsifiers, stabilisers, thickeners and gelling agents.

This is browserified, minified version of food-e. It is exported as global variable food_e. CDN: unpkg, jsDelivr.

console

foode "E101a"
# E101a: Riboflavin-5'-Phosphate
# .type: color (Yellow-orange); .status: e

foode "101 a"
# E101a: Riboflavin-5'-Phosphate
# .type: color (Yellow-orange); .status: e

foode "riboflavin"
# E101a: Riboflavin-5'-Phosphate
# .type: color (Yellow-orange); .status: e
#
# E106: Riboflavin-5-Sodium Phosphate
# .type: color (Yellow); .status: 
# ...

reference

foode [options] <query>
# query: code, name, type, or status of food additive
# Options:
# --help: show this help
# --silent: hide error messages

# Environment variables:
$FOODE_SILENT # hide error messages (0)

javascript

const foode = require('food-e');

foode('E101a');
// [ { code: 'E101a',
//     names: 'Riboflavin-5\'-Phosphate',
//     type: 'color (Yellow-orange)',
//     status: 'e' } ]

foode('101 a');
// [ { code: 'E101a',
//     names: 'Riboflavin-5\'-Phosphate',
//     type: 'color (Yellow-orange)',
//     status: 'e' } ]

foode('riboflavin');
// [ { code: 'E101a',
//     names: 'Riboflavin-5\'-Phosphate',
//     type: 'color (Yellow-orange)',
//     status: 'e' },
//   { code: 'E106',
//     names: 'Riboflavin-5-Sodium Phosphate',
//     type: 'color (Yellow)',
//     status: '' },
//   ... ]

reference

MethodAction
foodeLists matching food additives.
loadPreloads food additive data (before use).
sqlGives commands to insert data to SQL database.
csvGives path of data CSV file.
corpusKeeps food additive data. {field}

nodef