• Given an array of valid property identifiers and an array of values, return an object associating the properties to the values

    Example

    zipObject(['a', 'b', 'c'], [1, 2]); // {a: 1, b: 2, c: undefined}
    

    Example

    zipObject(['a', 'b'], [1, 2, 3]); // {a: 1, b: 2}
    

    Type Parameters

    • T

    Parameters

    • arr: T[]
    • array: any[]

    Returns Record<string, unknown>

Generated using TypeDoc