@neoskop/ugl

A library to create UGL files

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Aug 28, 2017Aug 10, 2017Minified + gzip package size for @neoskop/ugl in KB

Readme

@neoskop/UGL

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

Master Travis master Test coverage master Known Vulnerabilities master

Develop Travis develop Test coverage develop Known Vulnerabilities develop

Installation

yarn add @neoskop/ugl

Usage

import { ugl, RequestType } from '@neoskop/ugl';
  
const builder = ugl(); // equivalent for new UGLBuilder(new UGLMemoryWriter(), Mode.Craftsman);  
  
builder.kop({ 
    requestType: RequestType.AB, 
    deliveryDate: new Date(2017, 8, 16),
    name: 'Mark Wecke'
});
  
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 })
}

builder.end();
  
console.log(builder.getWriter().toString());

Testing

yarn test

Building

yarn run build

License

MIT

Sponsor

Neoskop GmbH

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.