onix-codelist
v3.0.2
Published
ONIX 3.0 Code lists
Downloads
592
Readme
onix-codelist
Typescript implementation of the ONIX 3.0 Code lists as specified by EDItEUR
These code list are up to date with issue 58 of the ONIX 3.0 standard.
Installation
$ npm install onix-codelist
Usage
onix-codelist
provides 2 way mapping for all Onix 3.0 code lists.
Code lists can be used by name:
import { productComposition } from 'onix-codelist';
const code = productComposition.MultipleComponentRetailProduct; // code = '10'
const type = productComposition[code]; // type = 'MultipleComponentRetailProduct'
Code lists can also be used by number:
import { list2 } from 'onix-codelist';
const code = list2.MultipleComponentRetailProduct; // code = '10'
const type = list2[code]; // type = 'MultipleComponentRetailProduct'