UNPKG

quantitivecalc

Version:

A TypeScript library providing advanced quantitative finance functions for risk analysis, performance metrics, and technical indicators. (Currently in development)

15 lines 748 B
/** * Finds the items with the minimum and maximum values in a specified column of an array of objects. * * @template T - The type of objects in the list. * @template K - The key of the column to compare, must be a key of T with comparable values. * @param list - The array of objects to search. * @param columnName - The key of the column to find extremes in. * @returns An object containing the items with the minimum and maximum values in the specified column. * If the list is empty, both `min` and `max` will be `undefined`. */ export default function findExtremesInColumn<T, K extends keyof T>(list: T[], columnName: K): { min: T | undefined; max: T | undefined; }; //# sourceMappingURL=findExtremesInColumn.d.ts.map