-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration: File formatter
You can pass a configuration object (CDIFFileOptions) to CDIF.serializeFile() to customize the behavior of the file formatter. Most values are optional, and will fall back to a default value if they are omitted or undefined. The available options in CDIFFileOptions are as follows:
addHeader?: boolean;Whether to prepend the # cDIF directive at the start of the file.
Default value: if cdifVersionString is supplied then true, else false
cdifVersionString?: string;cDIF version string to use in the # cDIF directive.
Required if addHeader is true, otherwise ignored
addFinalSemicolon?: boolean;Whether to append a semicolon at the end of the data value.
Default value: false
allowUnexpectedVersionString?: boolean;If true, cdifVersionString will not be validated. If false, an error will be thrown if cdifVersionString is invalid or does not match the cDIF version in use.
Default value: false