Interface ParseInputOptions

Input options for the parser

Common ways to call:

  • from: 'tickets.csv' (auto-detect by extension)
  • data: 'Project,Summary\nENG,Set up CI', format: 'csv' (inline CSV string)
  • data: [{ Project: 'ENG', Summary: 'Create board' }] (already-parsed JSON array)
  • data: [['Project','Summary'], ['ENG','Do X']], format: 'csv' (array-of-arrays as CSV)

Notes:

  • Strings require format to be set.
  • YAML supports document streams with --- separators (no indentation needed).
  • In CSV, empty unquoted cells become null; quote them to keep empty strings.

CSV string (requires format: 'csv')

Example

{ data: 'Project,Summary\\nENG,Set up CI', format: 'csv' }

JSON array string

Example

{ data: '[{\"Project\":\"ENG\",\"Summary\":\"Create board\"}]', format: 'json' }

YAML document stream string (no indentation needed)

Example

{
data: 'Project: ENG\\nSummary: Epic parent\\n---\\nProject: ENG\\nSummary: Child story',
format: 'yaml'
}
interface ParseInputOptions {
    data?: string | Record<string, unknown> | unknown[];
    format?: "yaml" | "json" | "csv";
    from?: string;
    preprocessCustomBlocks?: boolean;
    preprocessQuotes?: boolean;
}

Properties

data?: string | Record<string, unknown> | unknown[]

Data to parse (string, array, or object)

format?: "yaml" | "json" | "csv"

Explicit format (required for string data without file extension)

from?: string

File path to read from

preprocessCustomBlocks?: boolean

Whether to preprocess custom blocks (<<< >>>) in the input. When enabled, custom block syntax is converted to properly quoted strings.

Default

true
preprocessQuotes?: boolean

Whether to preprocess quotes in the input to fix common copy/paste issues. When enabled, the parser will automatically escape unescaped quotes in string values.

Default

true