Function autoType

  • Infers the types of values on the object and coerces them accordingly, returning the mutated object. This function is intended to be used as a row accessor function in conjunction with dsv.parse and dsv.parseRows.

    Type Parameters

    • ParsedRow extends object

    • Columns extends string

    Parameters

    • object: readonly string[] | DSVRowString<Columns>

      An object (or array) representing a parsed row

    Returns ParsedRow