Skip to main content
Version: v0.0.2

Function: coding()

coding(init): Coding

Construct a deep-frozen Coding.

The returned object is Object.freezed so it cannot be mutated in place - parsed/translated values are immutable by default. Optional fields are only present when supplied (no undefined keys), so structural equality checks stay clean.

Parameters

init

Coding

The coding fields; code is required.

Returns

Coding

A frozen Coding.

Example

import { coding } from "@cosyte/terminology";

const frozen = coding({ system: "http://loinc.org", code: "2160-0" });
Object.isFrozen(frozen); // => true