readTa1s()
readTa1s(
document):object[]
Defined in: packages/parser/src/profiles/acknowledgements/ta1/reader.ts:36
Reads every TA1 in a document, in the order they appear.
Parameters
| Parameter | Type | Description |
|---|---|---|
document | X12Document | The result of readX12. |
Returns
object[]
Each TA1 with the interchange it came from.
Example
ts
import { readX12 } from '@ediocracy/parser';
import { readTa1s } from '@ediocracy/parser/acknowledgements';
for (const { ta1 } of readTa1s(readX12(text))) {
console.log(ta1.controlNumber, ta1.code, ta1.noteCode);
}