Skip to content

Provide helpers to avoid the loop? #9

Description

@severo

parseURL and parseText are iterators. We could export helpers that return a consolidated object, eg:

const parsedText = parseAndConcatText(text)
const parsedURL = await parseAndConcatURL(url)

Which would be the consolidated format?

{
  rows: string[][],
  errors: ParseError[][],
  meta: {
    // Accumulated values
    delimiter: string
    newline: string
    byteOffset: number
    byteCount: number
    charCount: number
  }
}

Alternative:

ParseResult[]

it would be simpler, but maybe less useful, since the user would possibly still have to map to their own format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions