Installation
@cosyte/hl7 is a zero-dependency TypeScript toolkit for Node.js. It ships dual ESM + CJS
builds with per-condition type declarations, so it works from either module system without
configuration.
Status: the 0.1 line, published on npm and public. The
npm installcommand below is live. The exported functions, the message and helper surfaces, and the 20 stable warning codes are the surface we keep stable; below 1.0 a breaking change moves the minor version, and the changelog says how to migrate. For the current published version, ask the registry (npm view @cosyte/hl7 version) rather than this page.
Prerequisites
- Node.js 22 or later. CI runs the tests on Node.js 22, 24 and 26. The package targets ES2023.
- A package manager:
pnpm,npm, oryarn. - No runtime dependencies. Nothing else is installed with it; it uses only Node.js built-ins.
Install
npm install @cosyte/hl7
Smoke test
Confirm the package resolves and its version symbol is present:
import { VERSION } from "@cosyte/hl7";
typeof VERSION; // => "string"
If that resolves, the install is good. Head to the Quickstart.
Module systems
@cosyte/hl7 is "type": "module" and exposes both conditions, so both of these resolve to the
right build without extra configuration:
// ESM / TypeScript
import { parseHL7 } from "@cosyte/hl7";
typeof parseHL7; // => "function"
// CommonJS
const { parseHL7 } = require("@cosyte/hl7");
The types are published per condition (.d.ts for import, .d.cts for require), and
pnpm attw checks both before every release, so your editor's types match the build you load.