Skip to content

Version sorting #5

@sgtpepper43

Description

@sgtpepper43

It would be great to be able to sort version numbers appropriately, right now it just does your standard string comparison so 1.10 is less than 1.9. A complicated solution would be to implement some sort of possibly optional dataType field on that can specify that it's a "version"; a not so complicated solution would be to just use a very basic regex (like /\d+\.\d+/) to determine if the value/column is full of version numbers (or maybe match on if the column header is /version/i?). And then we can just grab node-semver, run coerce on the values and compare them. I'm more than happy to make the PR, just wanna nail down how we'd want to do it first

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions