-11
lib/versions.nix
-11
lib/versions.nix
···
6
6
/**
7
7
Break a version string into its component parts.
8
8
9
-
10
9
# Examples
11
10
:::{.example}
12
11
## `splitVersion` usage example
···
23
22
/**
24
23
Get the major version string from a string.
25
24
26
-
27
25
# Inputs
28
26
29
27
`v`
30
28
31
29
: 1\. Function argument
32
-
33
30
34
31
# Examples
35
32
:::{.example}
···
47
44
/**
48
45
Get the minor version string from a string.
49
46
50
-
51
47
# Inputs
52
48
53
49
`v`
54
50
55
51
: 1\. Function argument
56
-
57
52
58
53
# Examples
59
54
:::{.example}
···
70
65
71
66
/**
72
67
Get the patch version string from a string.
73
-
74
68
75
69
# Inputs
76
70
···
78
72
79
73
: 1\. Function argument
80
74
81
-
82
75
# Examples
83
76
:::{.example}
84
77
## `patch` usage example
···
96
89
Get string of the first two parts (major and minor)
97
90
of a version string.
98
91
99
-
100
92
# Inputs
101
93
102
94
`v`
103
95
104
96
: 1\. Function argument
105
-
106
97
107
98
# Examples
108
99
:::{.example}
···
120
111
/**
121
112
Pad a version string with zeros to match the given number of components.
122
113
123
-
124
114
# Inputs
125
115
126
116
`n`
···
130
120
`version`
131
121
132
122
: 2\. Function argument
133
-
134
123
135
124
# Examples
136
125
:::{.example}