npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@emdzej/ncsx-options

v0.8.0

Published

CVT DATEN reader — emits an OptionFunctionList of per-(FSW, PSW) AUFTRAGSAUSDRUCK predicate bytes for friendly UI filtering. Mirrors NCSDummy's Classes/Options/OptionListReader. Spec: ../../docs/ncsdummy-analysis.md §3.3.

Readme

@emdzej/ncsx-options

Reads a chassis-level CVT DATEN file (<BR>CVT.000) and emits an OptionList — per-(FSW, PSW) byte-coded AUFTRAGSAUSDRUCK predicates that tell the UI which PSWs are applicable under which FAs.

This is the data backing the "✓ in FA / ⚠ not in FA" badges next to each PSW in the friendly checkbox editor. Pair with @emdzej/ncsx-predicate to evaluate each predicate against the car's FA.

Mirrors NCS Dummy's Classes/Options/OptionListReader. Design notes: ../../docs/ncsdummy-analysis.md §3.3.

What it does

Walks the CVT DATEN file's rows in document order:

  • An AUFTRAGSAUSDRUCK row stashes its predicate bytes.
  • The immediately-following FSW_PSW row consumes that predicate and binds it to its (FSW, PSW) target.
  • If multiple AUFTRAGSAUSDRUCK fragments accumulate for the same (FSW, PSW) pair (a legitimate CVT pattern), they're comma-joined into one OR-of-conjunctions blob.
  • GRUPPE / INDIVID boundary rows toggle scope; by default only group-scope rows are surfaced (per NCS Dummy convention — individual-mode coding isn't part of order options).

Install

pnpm add @emdzej/ncsx-options
# or:
"@emdzej/ncsx-options": "workspace:*"

Quick start

import { readFileSync } from 'node:fs';
import { parseDatenFile } from '@emdzej/ncsx-daten';
import { buildOptionList } from '@emdzej/ncsx-options';
import { evalAuftragsausdruck } from '@emdzej/ncsx-predicate';
import { faToAsw } from '@emdzej/ncsx-fa-asw';

const cvt = parseDatenFile(readFileSync('E46CVT.000'));
const opts = buildOptionList(cvt);

const asw = faToAsw('0205 0502 0524', { chassis });

for (const fn of opts.functions) {
  for (const p of fn.parameters) {
    const applicable =
      p.predicate.length === 0
        ? true
        : evalAuftragsausdruck(p.predicate, asw);
    console.log(`FSW=${fn.fsw} PSW=${p.psw} ${applicable ? '✓' : '⚠'}`);
  }
}

API

| Export | Purpose | |-----------------------|---------------------------------------------------------------| | buildOptionList(cvt, opts?) | Walk a parsed CVT DatenFileOptionList | | OptionList | Top-level result — { functions: OptionFunction[] } | | OptionFunction | One FSW's options: { fsw, parameters: OptionParameter[] } | | OptionParameter | One PSW's predicate: { psw, predicate: Uint8Array } | | OptionListError | Thrown on malformed rows |

buildOptionList options

buildOptionList(cvt, {
  // When true (default), rows inside INDIVID scope are skipped. Set false if you want
  // to surface individual-mode options too (rare; typically used for car-and-key memory
  // edits).
  groupScopeOnly: true,
});

Predicate encoding

The predicate byte arrays are AUFTRAGSAUSDRUCK in the same byte-coded language used by <BR>SGET.000 rows. Evaluate them via @emdzej/ncsx-predicate:

import { evalAuftragsausdruck, extractReferencedIds } from '@emdzej/ncsx-predicate';

const applies = evalAuftragsausdruck(param.predicate, asw);
const sasMentioned = extractReferencedIds(param.predicate); // for tooltips

An empty predicate means "always applicable" — no FA constraint on this PSW. Most basic on/off PSWs (aktiv, nicht_aktiv) have empty predicates; the gating predicates mostly live on country variants, special-equipment options, and version-specific values.

When multiple fragments accumulate

CVT files sometimes list the same (FSW, PSW) pair more than once, each preceded by a different AUFTRAGSAUSDRUCK fragment. NCS Dummy treats that as an OR of the fragments and comma-joins them; this package matches that convention. The joined byte sequence is still a valid AUFTRAGSAUSDRUCK and evaluates correctly through the standard predicate evaluator.

Related