Skip to content

API: Main

Madeline Kahn edited this page Dec 30, 2025 · 5 revisions

API"@mkacct/cdif"

"@mkacct/cdif" is the package's main module, containing all of its expected features.

CDIF (default export)

class CDIF

View details: CDIF

The CDIF class contains all of this library's main functionality, both for parsing and serializing cDIF data.

CDIFPrimitiveValue

class CDIFPrimitiveValue

View details: CDIFPrimitiveValue

A CDIFPrimitiveValue object represents an encoded cDIF primitive value. When used within a structure to be serialized, its cDIF text will be used as-is, and any preprocessors will be skipped. It is comparable to JavaScript's "raw JSON" objects.

Error classes

  • CDIFError – Base class for all cDIF-related errors
  • CDIFSyntaxError – Thrown if input does not conform to cDIF syntax.
  • CDIFReferenceError – Thrown if a component reference cannot be resolved.
  • CDIFTypeError – Thrown if a value is of the wrong type.
  • CDIFDirectiveError – Thrown if directives are used incorrectly.

Clone this wiki locally