marpple / FxTS

A functional programming library for TypeScript/JavaScript
https://fxts.dev
Apache License 2.0
881 stars 63 forks source link

Add order comment in uniq, uniqBy document #277

Closed hg-pyun closed 3 months ago

hg-pyun commented 3 months ago

The documentation for uniq and uniqBy lacks an explanation of the logic used for determining uniqueness. The lodash documentation provides additional details as follows. It would be helpful to include this information in the documentation.

The order of result values is determined by the order they occur in the array.

_.uniqBy([2.1, 1.2, 2.3], Math.floor);
// => [2.1, 1.2]

Report: @chatoo2412