-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration: Parser
You can pass a CDIFParserOptions object to CDIF.parse() to customize the behavior of the parser. All values are optional, and will fall back to a default value if they are omitted or undefined. The available options in CDIFParserOptions are as follows:
useBigInt?: boolean;If true, integer values will be parsed as bigint to preserve precision of large integers.
Default value: false
postprocessors?: ReadonlyArray<CDIFParserPostprocessorFunction>;Array of postprocessor functions, in order of precedence. Postprocessor functions are called for each value after parsing. They can be used to customize the behavior of the parser (ex. to instantiate objects of the appropriate class). See the documentation on postprocessors for more information.
Default value: []
allowUnexpectedVersionString?: boolean;If true, the version string in a # cDIF directive will not be validated. If false, an error will be thrown if the # cDIF directive's version string is invalid or does not match the cDIF version in use.
Default value: false