Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(collections): add the word "unique" to distinctBy JSDoc for grepping purposes (#6335) #6336

Merged
merged 5 commits into from
Jan 10, 2025

Conversation

lionel-rowe
Copy link
Contributor

@lionel-rowe lionel-rowe commented Jan 6, 2025

See #6335

Currently, grepping for "uniq" or "unique" yield zero results:

image

This PR is mainly to fix that problem, along with a note about how equality is determined.

Also:

  • Changed name of callback param from selector to discriminator — "selector" is confusing as it gets the respective key from each item, rather than selecting items
  • Changed example to something more representative of typical usage

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.43%. Comparing base (6cf1eea) to head (43d55fe).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6336   +/-   ##
=======================================
  Coverage   96.43%   96.43%           
=======================================
  Files         547      547           
  Lines       41788    41812   +24     
  Branches     6341     6347    +6     
=======================================
+ Hits        40297    40322   +25     
+ Misses       1450     1449    -1     
  Partials       41       41           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lionel-rowe lionel-rowe changed the title docs(collections): add the word unique to distinctBy JSDoc for grepping purposes (#6335) docs(collections): add the word "unique" to distinctBy JSDoc for grepping purposes (#6335) Jan 7, 2025
collections/distinct.ts Outdated Show resolved Hide resolved
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All suggestions look reasonable to me. Thanks for the PR!

@kt3k kt3k merged commit 2604b37 into denoland:main Jan 10, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants