Skip to content

Version Helpers

Utility functions for working with version operations.

Function Description
compare Compares two semantic version strings according to SemVer 2.0.0 specification Supports: - Core version: MAJOR.MINOR.PA…
increment Increments a semantic version
incrementPrerelease Increments the prerelease portion of a semantic version — the semantics `npm version prerelease --preid ` uses, not…
isPrerelease Returns `true` when the version string has a prerelease suffix (i.e.
parse Parses a semantic version string into its components according to SemVer 2.0.0 specification Supports: - Core version:…
satisfiesRange Checks if a version satisfies a range (simple implementation)
stringify Reconstruct a semantic version string from a ParsedVersion object.
stripV Strip the leading “v” from a version string if it exists.