read271s()
read271s(
document):object[]
Defined in: packages/parser/src/profiles/271/reader.ts:210
Reads every 271 in a document, in the order they appear.
Parameters
| Parameter | Type | Description |
|---|---|---|
document | X12Document | The result of readX12. |
Returns
object[]
Each response with the interchange and functional group it came from.
Example
ts
import { readX12 } from '@ediocracy/parser';
import { read271s } from '@ediocracy/parser/271';
for (const { response } of read271s(readX12(text))) {
console.log(response.subscribers.length, response.findings.length);
}