Skip to content

neoskop/neoskop-ugl

Repository files navigation

@neoskop/UGL

A Javascript implementation of the UGL Interface (german only).

Master Test coverage master Known Vulnerabilities master

Develop Test coverage develop Known Vulnerabilities develop

Installation

yarn add @neoskop/ugl
# or
npm install --save @neoskop/ugl

Usage

import UGL from '@neoskop/ugl';

const builder = new UGL.Builder();

builder.kop({
    requestType: RequestType.AB,
    deliveryDate: new Date(2024, 0, 16),
    name: 'Foo Bar'
});

const articles = [
    ['0014211241', 'Article A', 123.32],
    ['0084353327', 'Article B', 23.87],
    ['0034267322', 'Article C', 74.52]
];

for (let [articleNumber, name, gross] of articles) {
    builder.poa({ articleNumber, name, gross });
}

console.log(builder.build());

2.0 Rewrite

  • Rewrite APIs
  • Refactor
  • Fix 202 byte line length issue
  • Add support for GDR records
  • Less strict validations, so RGD – POA - KOP - POA – POA – KOP – POA – POA - END could be generated now

Testing

yarn test

Building

yarn run build

License

MIT

Sponsor

Neoskop GmbH

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published