# stdf-parser

> Standard Test Data Format V4 parser

Latest version **2.0.2** (published 2024-11-07) · 0 weekly downloads

## Install

```sh
npm install stdf-parser
pnpm add stdf-parser
yarn add stdf-parser
bun add stdf-parser
```

Provides the command `stdf-parser`.

## Health

**Score 35/100 (D)** — status: maintenance-mode.

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

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2024-11-07 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 3 |
| Unpacked size | 139.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bangbang93 |
| Keywords | stdf, std, stdfv4, parse, parser, Standard Test Data Format, wafer |

## Links

- npm: https://www.npmjs.com/package/stdf-parser
- npm.io page: https://npm.io/package/stdf-parser

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [progress](https://npm.io/package/progress.md) ^2.0.3
- [smart-buffer](https://npm.io/package/smart-buffer.md) ^4.2.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2024-11-07
- 0.5.1-3 (next) — 2023-11-02
- 2.0.1 — 2024-11-07
- 2.0.0 — 2024-11-07
- 1.0.3 — 2024-11-01
- 1.0.2 — 2024-10-18
- 1.0.1 — 2024-02-02
- 1.0.0 — 2023-11-16
- 0.5.1-2 — 2023-11-02
- 0.5.1-1 — 2023-11-02
- 0.5.1-0 — 2023-11-02
- 0.5.0 — 2023-11-02
- 0.4.2 — 2023-10-27
- 0.4.1 — 2023-08-02
- 0.4.0 — 2023-05-18
- … 27 more at https://npm.io/package/stdf-parser/versions

## README

# STDF parser
Standard Test Data Format V4 parser

# Cli
```bash
npm install -g stdf-parser
stdf-parser a.stdf
less a.stdf.ndjson
```

## Usage

### Stream Parser (Recommended for large file)
```typescript
import {StdfParser} from 'stdf-parser'
import {once} from 'events'

const stream = createReadStream(filename)
const parser = stream.pipe(StdfParser.stream())
for await (const record of parser) {
  if (record instanceof PtrRecord) {
    console.log(record)
  }
}
```

### Buffer Parser (Faster for small file)
```typescript
import {StdfParser} from 'stdf-parser'
const file = readFileSync(filename)

console.time('parse')
const stdfFile = StdfParser.parse(SmartBuffer.fromBuffer(file))
console.log(stdfFile.records.length)
```

_warning: may use 2-3 times memory of file size_

---
_Source: https://npm.io/package/stdf-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
