tdecaluwe / node-edifact

Javascript stream parser for UN/EDIFACT documents.
https://www.npmjs.com/package/edifact
Apache License 2.0
50 stars 13 forks source link

Support EDIFACT segment tables #1

Closed tdecaluwe closed 8 years ago

tdecaluwe commented 8 years ago

Allow the use of segment tables to accept or reject EDIFACT messages. This is accomplished through the use of a separate Tracker class which tracks the current position in the segment table.

The Reader class implements some default hooks to enable tracking of a segment table when encountering UNH segments if a corresponding json file is found in the messages folder. The tracker is destroyed when the corresponding UNT segment is encountered.