parse files based on a specific schema S TODO clean this up. re-purpose it correctly. create interface for the required encode and decode functions required by the parser

Type Parameters

  • S extends SchemaNode<any, string>

Constructors

  • Type Parameters

    • S extends SchemaNode<any, string>

    Parameters

    • schema: S

      which schema class to base the decoding and encoding on

    • attach_to: undefined | HTMLElement = document.body

      where do you wish to attach the loader_input html element? if undefined, it will not get attached to the DOM. default = document.body

    Returns FileParser<S>

Properties

loader_input: HTMLInputElement = ...

the html input element that provides a gateway for user file selection

downloader_link: HTMLAnchorElement = ...
file_reader: FileReader = ...
schema: S

schema to be used for encoding and decoding

loaded_data: NonNullable<S["value"]>[] = []

a list of decoded files. you can delete the entries here to save up memory

Methods

  • download the provided javascript object as a binary blob, by encoding it based on this.schema.encode

    Parameters

    • value: NonNullable<S["value"]>
    • filename: string = ""

    Returns void

Generated using TypeDoc