• Returns the maximum value of a given path

    Example

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

    Example

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

    Type Parameters

    • Value extends Record<string, unknown>

    • Path extends string = never

    Parameters

    • array: Value[]
    • Optional path: Path

    Returns number

  • Returns the maximum value of a given path

    Example

    max([1, 2, 3]); // 3
    

    Type Parameters

    • Value

    Parameters

    • array: Value[]

    Returns number

Generated using TypeDoc