Skip to content

Remove duplicates. #50

@crass

Description

@crass

What version of this package are you using?
2.0.0

What problem do you want to solve?
Remove duplicate indices. Should this not be done and leave it up to consumers? Are there any benefits to leaving in duplicates?

What do you think is the correct solution to this problem?
I see two solutions, one that preserves index ordering and one that does not. The question for me is, "is preserving index ordering valuable?" Solutions:

  1. Do not preserve ordering and use Array.from(new Set(..)) to remove duplicates.
    1.1. This changes the ordering. Would sorting to provide consistency be beneficial?
  2. Remove duplicates but preserve original order.
    2.1 This is not hard, but not as trivial. I could see this being beneficial if download order was inferred from index order, aka priority. The BEP53 spec gives me no reason to believe there is a benefit to this.

Are you willing to submit a pull request to implement this change?
Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions