food-e
TypeScript icon, indicating that this package has built-in type declarations

1.0.21 • Public • Published

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.

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

Method Action
foode Lists matching food additives.
load Preloads food additive data (before use).
sql Gives commands to insert data to SQL database.
csv Gives path of data CSV file.
corpus Keeps food additive data. {field}

nodef

Browserified, minified version of this package is food-e.min.

Package Sidebar

Install

npm i food-e

Weekly Downloads

8

Version

1.0.21

License

MIT

Unpacked Size

88.8 kB

Total Files

8

Last publish

Collaborators

  • wolfram77