Skip to main content
Home

Built and signed on GitHub Actions

Programmatically access E-number and INS-number data for food additives.

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
3 weeks ago (0.1.1)

This is a package that allows you to programmatically access E number and INS number data for food additives, including their names, types, and (approval) status.

▌ 📦 JSR, 📰 Docs.



Reference

Method Action
e Find matching food additives with a code/names/type/status query (E number).
ins Find matching food additives with a code/names/type/status query (INS number).


E numbers

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.


import * as foodAdditive from "jsr:@nodef/food-additive";
// foodAdditive.loadE() → corpus
// foodAdditive.eSql([table], [options]) → SQL statements
// foodAdditive.eCsv() → Path of CSV file
// foodAdditive.e(query)
// → matching [{code, names, type, status}]

await foodAdditive.loadE();
// Load corpus first

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

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

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


INS numbers

The International Numbering System for Food Additives (INS) is a European-based naming system for food additives. It is defined by Codex Alimentarius, the WHO, and the FAO.

Class Names and the International Numbering System for Food Additives, was first published in 1989, with revisions in 2008 and 2011. The INS is an open list, "subject to the inclusion of additional additives or removal of existing ones on an ongoing basis".


import * as foodAdditive from "jsr:@nodef/food-additive";

await foodAdditive.loadI();
// Load corpus first

foodAdditive.ins('102');
// → [ { code: '102',
// →     names: 'tartrazine',
// →     type: 'colour (yellow and orange) (FDA: FD&C Yellow #5)',
// →     status: 'a e' } ]

foodAdditive.ins('ins 102');
// → [ { code: '102',
// →     names: 'tartrazine',
// →     type: 'colour (yellow and orange) (FDA: FD&C Yellow #5)',
// →     status: 'a e' } ]

foodAdditive.ins('ins 160 d (iii)');
// → [ { code: '160d(iii)',
// →     names: 'lycopene, Blakeslea trispora',
// →     type: 'colour',
// →     status: 'a e' },
// →   { code: '160d', names: 'lycopenes', type: '', status: 'a e' },
// →   ... ]


License

As of 23 April 2025, this project is licensed under AGPL-3.0. Previous versions remain under MIT.




ORG

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@nodef/food-additive

Import symbol

import * as food_additive from "@nodef/food-additive";
or

Import directly with a jsr specifier

import * as food_additive from "jsr:@nodef/food-additive";

Add Package

pnpm i jsr:@nodef/food-additive
or (using pnpm 10.8 or older)
pnpm dlx jsr add @nodef/food-additive

Import symbol

import * as food_additive from "@nodef/food-additive";

Add Package

yarn add jsr:@nodef/food-additive
or (using Yarn 4.8 or older)
yarn dlx jsr add @nodef/food-additive

Import symbol

import * as food_additive from "@nodef/food-additive";

Add Package

npx jsr add @nodef/food-additive

Import symbol

import * as food_additive from "@nodef/food-additive";

Add Package

bunx jsr add @nodef/food-additive

Import symbol

import * as food_additive from "@nodef/food-additive";