Skip to content

Add IterableExtension.sortedByDescending to package:collection #725

Open
@loic-sharma

Description

@loic-sharma

Problem

To sort GitHubIssues by their updatedAt field, descending:

issues.sortedByCompare((issue) => issue.updatedAt, (a, b) => b.compareTo(a));

This is inconvenient.

Solution

Introduce a sortedByDescending helper:

issues.sortedByDescending((issue) => issue.updatedAt);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions