Skip to content

oracular / RECORD_VERSION

Variable: RECORD_VERSION ​

ts
const RECORD_VERSION: 1;

Defined in: version.ts:40

Version of the recorder format: the v field of every record that createRecord and createEndRecord produce. A new optional field does not change it; readers ignore fields they do not know and skip records of a kind they do not know. Anything a reader written for this version could misread bumps it.

Example ​

ts
import { RECORD_VERSION } from 'oracular';

const record = JSON.parse(line);
if (record.v !== RECORD_VERSION) throw new Error(`unsupported recorder format ${record.v}`);

Released under the MIT License.