stringify
Reconstruct a semantic version string from a ParsedVersion object.
This is the inverse of parse:
stringify(parse(v)) === stripV(v) for any valid SemVer string v.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
parsed | ParsedVersion | A parsed semantic version object. |
Returns
Section titled “Returns”string — The reconstructed version string (without leading v).
Examples
Section titled “Examples”Reconstruct a stable version
Section titled “Reconstruct a stable version”Converts a ParsedVersion object back to a version string.
Round-trip with parse
Section titled “Round-trip with parse”stringify(parse(v)) returns the original version string (without leading v).
