node-stats-lite icon indicating copy to clipboard operation
node-stats-lite copied to clipboard

mode is returning an Array instead of Set if count of modes is same as count of numbers in the parameter passed to mode.

Open yrambler2001 opened this issue 1 year ago • 0 comments

Image Image

https://codesandbox.io/p/sandbox/jr25j2?file=%2Fsrc%2FApp.tsx%3A10%2C82

Sample cases when the expected result is Set, but the function returns Array.

mode([1, 2])
mode([1, 2, 3, 4])

there on line 88, a Set should be returned

Image

yrambler2001 avatar Jan 31 '25 18:01 yrambler2001