{"size": 844, "ext": "scrbl", "max_stars_repo_path": "package-version.scrbl", "max_stars_repo_name": "jackfirth/package-analysis", "max_stars_repo_stars_event_min_datetime": "2019-10-12T09:24:46.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-23T07:59:51.000Z", "max_issues_repo_path": "package-version.scrbl", "max_issues_repo_name": "jackfirth/package-analysis", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "package-version.scrbl", "max_forks_repo_name": "jackfirth/package-analysis", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.1428571429, "max_line_length": 74, "alphanum_fraction": 0.5853080569}
#lang scribble/manual

@(require (for-label package-analysis
                     racket/base
                     racket/contract/base
                     racket/math))

@title{Package Versions}

@defproc[(package-version? [v any/c]) boolean?]

@defproc[(package-version [major natural?]
                          [minor (integer-in 0 99)]
                          [patch (integer-in 0 999) 0]
                          [release (integer-in 0 999) 0])
         package-version?]

@defproc[(package-version-major-part [version package-version?]) natural?]

@defproc[(package-version-minor-part [version package-version?])
         (integer-in 0 99)]

@defproc[(package-version-patch-part [version package-version?])
         (integer-in 0 999)]

@defproc[(package-version-release-part [version package-version?])
         (integer-in 0 999)]
