# @ipguk/erg-file-reader

> File reader for IPG Automotive .erg result files

Latest version **1.3.1** (published 2026-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ipguk/erg-file-reader
pnpm add @ipguk/erg-file-reader
yarn add @ipguk/erg-file-reader
bun add @ipguk/erg-file-reader
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2026-06-17 |
| First published | 2022-03-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 47.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | IPG Automotive UK |
| Maintainers | ipgukdev, elenavoineaipg, nikitha.nalumachu, mattcorneripguk, m4manjesh, lukeipg, arpadlomenipg |

## Links

- npm: https://www.npmjs.com/package/@ipguk/erg-file-reader
- npm.io page: https://npm.io/package/@ipguk/erg-file-reader

## Recent versions

- 1.3.1 (latest) — 2026-06-17
- 1.3.0 — 2026-03-24
- 1.2.1 — 2023-10-04
- 1.2.0 — 2023-10-03
- 1.1.0 — 2023-07-25
- 1.0.0 — 2022-03-14

## README

# IPG Automotive erg file reader

JavaScript file reader for IPG Automotive .erg result files. The reader requires a .erg file and corresponding .info file.

The data is returned as an array of quantity objects. Each object represents a quantity and contains the following properties:

- name - the name of the quantity e.g. 'Car.Distance'
- type - the data type of the quantity e.g. 'Double'
- unit - the unit of the quantity e.g. 'm'
- values - array of values for the quantity e.g. [0, 1, 2, 3]

Further information on the erg file format can be found in appendix A.1 of the IPG Automotive reference manual.

## Install

```
npm install --save @ipguk/erg-file-reader
```

## Usage

Import library

```
const erg = require("@ipguk/erg-file-reader");
```

Define the .erg and .info file paths

```
let ergFile = "MyFile.erg";
let infoFile = "MyFile.erg.info";
```

Read the data for all quantities

```
let data = erg.read(ergFile, infoFile);
```

Read quantity definitions - no data values are returned, just the name and unit of each quantity

```
let quants = erg.readInfoQuants(infoFile);
```

Read header information - Date, Testrun Name, CarMaker Version, Parameter

```
let header = erg.readInfoHeader(infoFile);
```

Validate ERG InfoFile

```
if(erg.validateInfoHeader(infoFile)){
    console.log("Valid ERG InfoFile);
}
else{
    console.log("Invalid ERG InfoFile);
}
```

---
_Source: https://npm.io/package/@ipguk/erg-file-reader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
