crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Add `SemanticVersion.valid?` and `SemanticVersion.parse?`

Open devnote-dev opened this issue 1 year ago • 0 comments
trafficstars

Currently the only way to "test" a semantic version string is to rescue from SemanticVersion.parse. Such helper methods would be really convenient given that there's no regex or alternative method publicly exposed to do so. It seems like these once existed in an old PR reworking the API and just didn't make it to the existing one, and looking at the implementation it's relatively straightforward to add.

devnote-dev avatar Sep 19 '24 23:09 devnote-dev