@lzcontest/adif
v0.1.1
Published
Typed ADIF import, export, translation, and profile contracts for amateur-radio logs.
Maintainers
Readme
@lzcontest/adif
Typed ADIF parsing, import, export, and profile contracts for amateur-radio logs.
Install
npm install @lzcontest/adifParse and serialize
import {
firstAdifField,
parseAdif,
serializeAdifField,
} from '@lzcontest/adif';
const document = parseAdif('<CALL:4>LZ9S<EOR>');
const call = firstAdifField(document.records[0]?.fields ?? [], 'CALL');
const field = serializeAdifField('CALL', 'LZ9S');
console.log(call?.value); // LZ9S
console.log(field); // <CALL:4>LZ9SCore API
| Export | Purpose |
| --- | --- |
| parseAdif | Parse ADIF text while retaining source fields and diagnostics |
| serializeAdifField | Serialize one typed ADIF field |
| firstAdifField | Read the first field with a given name |
| importAdif | Convert an ADIF document into a log import draft |
| exportAdif | Export log QSOs through an ADIF profile |
| AdifProfile | Mode, band, exchange, and contest mapping contract |
| nativeModeForAdif | Translate ADIF mode and submode values |
| adifModeForNative | Translate a native mode to ADIF |
