From 241e6f8854c950f21717be9b97923e776330f0d4 Mon Sep 17 00:00:00 2001 From: JZ Song Date: Wed, 21 Feb 2024 03:07:11 +0100 Subject: [PATCH] Update series.ts function doc to be more specific (#330) chore: adjust comment for min and max, make it meaningful. --- src/series.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/series.ts b/src/series.ts index 08810479..ce746f15 100644 --- a/src/series.ts +++ b/src/series.ts @@ -26,14 +26,14 @@ export const series = ( ) /** * Given two values in the series, returns the - * value that occurs later in the series + * value that occurs earlier in the series */ const min = (a: T, b: T): T => { return indexesByKey[toKey(a)] < indexesByKey[toKey(b)] ? a : b } /** * Given two values in the series, returns the - * value that occurs earlier in the series + * value that occurs later in the series */ const max = (a: T, b: T): T => { return indexesByKey[toKey(a)] > indexesByKey[toKey(b)] ? a : b