@helpers4/version 2.0.0-alpha.2 → 2.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/meta/api.json ADDED
@@ -0,0 +1,470 @@
1
+ {
2
+ "category": "version",
3
+ "version": "2.0.0-alpha.21",
4
+ "functions": [
5
+ {
6
+ "name": "compare",
7
+ "kind": "function",
8
+ "description": "Compares two semantic version strings according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, etc.\n- Build metadata: +build, +sha.abc123 (ignored in comparison per spec)\n- Optional 'v' prefix",
9
+ "since": "1.9.0",
10
+ "signatures": [
11
+ {
12
+ "signature": "compare(version1: string, version2: string): number",
13
+ "description": "Compares two semantic version strings according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, etc.\n- Build metadata: +build, +sha.abc123 (ignored in comparison per spec)\n- Optional 'v' prefix",
14
+ "params": [
15
+ {
16
+ "name": "version1",
17
+ "type": "string",
18
+ "description": "First version string"
19
+ },
20
+ {
21
+ "name": "version2",
22
+ "type": "string",
23
+ "description": "Second version string"
24
+ }
25
+ ],
26
+ "returns": {
27
+ "type": "number",
28
+ "description": "-1 if version1 < version2, 0 if equal, 1 if version1 > version2"
29
+ }
30
+ }
31
+ ],
32
+ "examples": [
33
+ {
34
+ "title": "Compare two semver versions",
35
+ "description": "Returns -1, 0, or 1 based on SemVer ordering.",
36
+ "code": "compare('1.0.0', '2.0.0') // => -1\ncompare('1.0.0', '1.0.0') // => 0\ncompare('2.0.0', '1.0.0') // => 1"
37
+ },
38
+ {
39
+ "title": "Prerelease is lower than release",
40
+ "description": "A prerelease version is always less than the release.",
41
+ "code": "compare('1.0.0-alpha', '1.0.0')\n// => -1"
42
+ }
43
+ ],
44
+ "sourceFile": "compare.ts"
45
+ },
46
+ {
47
+ "name": "increment",
48
+ "kind": "function",
49
+ "description": "Increments a semantic version",
50
+ "since": "1.9.0",
51
+ "signatures": [
52
+ {
53
+ "signature": "increment(version: string, type: \"major\" | \"minor\" | \"patch\"): string",
54
+ "description": "Increments a semantic version",
55
+ "params": [
56
+ {
57
+ "name": "version",
58
+ "type": "string",
59
+ "description": "The version to increment"
60
+ },
61
+ {
62
+ "name": "type",
63
+ "type": "\"major\" | \"minor\" | \"patch\"",
64
+ "description": "The increment type ('major', 'minor', 'patch')"
65
+ }
66
+ ],
67
+ "returns": {
68
+ "type": "string",
69
+ "description": "Incremented version string"
70
+ }
71
+ },
72
+ {
73
+ "signature": "increment(version: undefined, type: \"major\" | \"minor\" | \"patch\"): undefined",
74
+ "description": "Increments a semantic version",
75
+ "params": [
76
+ {
77
+ "name": "version",
78
+ "type": "undefined",
79
+ "description": "The version to increment"
80
+ },
81
+ {
82
+ "name": "type",
83
+ "type": "\"major\" | \"minor\" | \"patch\"",
84
+ "description": "The increment type ('major', 'minor', 'patch')"
85
+ }
86
+ ],
87
+ "returns": {
88
+ "type": "undefined",
89
+ "description": "Incremented version string"
90
+ }
91
+ },
92
+ {
93
+ "signature": "increment(version: null, type: \"major\" | \"minor\" | \"patch\"): null",
94
+ "description": "Increments a semantic version",
95
+ "params": [
96
+ {
97
+ "name": "version",
98
+ "type": "null",
99
+ "description": "The version to increment"
100
+ },
101
+ {
102
+ "name": "type",
103
+ "type": "\"major\" | \"minor\" | \"patch\"",
104
+ "description": "The increment type ('major', 'minor', 'patch')"
105
+ }
106
+ ],
107
+ "returns": {
108
+ "type": "null",
109
+ "description": "Incremented version string"
110
+ }
111
+ }
112
+ ],
113
+ "examples": [
114
+ {
115
+ "title": "Increment the patch version",
116
+ "description": "Bumps the patch number while keeping major and minor.",
117
+ "code": "increment('1.2.3', 'patch')\n// => '1.2.4'"
118
+ },
119
+ {
120
+ "title": "Increment the minor version",
121
+ "description": "Bumps the minor number and resets patch to 0.",
122
+ "code": "increment('1.2.3', 'minor')\n// => '1.3.0'"
123
+ },
124
+ {
125
+ "title": "Preserve the v prefix",
126
+ "description": "The v prefix is preserved if present in the input.",
127
+ "code": "increment('v1.0.0', 'major')\n// => 'v2.0.0'"
128
+ }
129
+ ],
130
+ "sourceFile": "increment.ts"
131
+ },
132
+ {
133
+ "name": "isPrerelease",
134
+ "kind": "function",
135
+ "description": "Returns `true` when the version string has a prerelease suffix\n(i.e. contains a `-` after the core `MAJOR.MINOR.PATCH`).",
136
+ "since": "next",
137
+ "signatures": [
138
+ {
139
+ "signature": "isPrerelease(version: string): boolean",
140
+ "description": "Returns `true` when the version string has a prerelease suffix\n(i.e. contains a `-` after the core `MAJOR.MINOR.PATCH`).",
141
+ "params": [
142
+ {
143
+ "name": "version",
144
+ "type": "string",
145
+ "description": "A semantic version string (e.g. `'2.0.0-alpha.1'`, `'1.0.0'`)."
146
+ }
147
+ ],
148
+ "returns": {
149
+ "type": "boolean",
150
+ "description": "`true` if the version is a prerelease, `false` otherwise."
151
+ }
152
+ },
153
+ {
154
+ "signature": "isPrerelease(version: ParsedVersion): boolean",
155
+ "description": "Returns `true` when the parsed version has at least one prerelease identifier.",
156
+ "params": [
157
+ {
158
+ "name": "version",
159
+ "type": "ParsedVersion",
160
+ "description": "A ParsedVersion object (as returned by parse)."
161
+ }
162
+ ],
163
+ "returns": {
164
+ "type": "boolean",
165
+ "description": "`true` if `version.prerelease` is non-empty, `false` otherwise."
166
+ }
167
+ },
168
+ {
169
+ "signature": "isPrerelease(version: undefined): undefined",
170
+ "description": "Returns `true` when the version string has a prerelease suffix\n(i.e. contains a `-` after the core `MAJOR.MINOR.PATCH`).",
171
+ "params": [
172
+ {
173
+ "name": "version",
174
+ "type": "undefined",
175
+ "description": "A semantic version string (e.g. `'2.0.0-alpha.1'`, `'1.0.0'`)."
176
+ }
177
+ ],
178
+ "returns": {
179
+ "type": "undefined",
180
+ "description": "`true` if the version is a prerelease, `false` otherwise."
181
+ }
182
+ },
183
+ {
184
+ "signature": "isPrerelease(version: null): null",
185
+ "description": "Returns `true` when the version string has a prerelease suffix\n(i.e. contains a `-` after the core `MAJOR.MINOR.PATCH`).",
186
+ "params": [
187
+ {
188
+ "name": "version",
189
+ "type": "null",
190
+ "description": "A semantic version string (e.g. `'2.0.0-alpha.1'`, `'1.0.0'`)."
191
+ }
192
+ ],
193
+ "returns": {
194
+ "type": "null",
195
+ "description": "`true` if the version is a prerelease, `false` otherwise."
196
+ }
197
+ }
198
+ ],
199
+ "examples": [
200
+ {
201
+ "title": "Detect a prerelease version",
202
+ "description": "Returns true for any version string that contains a prerelease suffix.",
203
+ "code": "isPrerelease('2.0.0-alpha.1') // true\nisPrerelease('1.0.0-rc.0') // true"
204
+ },
205
+ {
206
+ "title": "Stable versions return false",
207
+ "description": "Returns false when the version has no prerelease suffix.",
208
+ "code": "isPrerelease('1.0.0') // false\nisPrerelease('2.1.3') // false"
209
+ },
210
+ {
211
+ "title": "Accept a ParsedVersion object",
212
+ "description": "Works with the result of parse() — checks the prerelease array instead of string matching.",
213
+ "code": "isPrerelease(parse('2.0.0-alpha.1')) // true\nisPrerelease(parse('1.0.0')) // false"
214
+ }
215
+ ],
216
+ "sourceFile": "isPrerelease.ts"
217
+ },
218
+ {
219
+ "name": "parse",
220
+ "kind": "function",
221
+ "description": "Parses a semantic version string into its components according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, -0.3.7, -x.7.z.92\n- Build metadata: +build, +sha.abc123, +20130313144700\n- Optional 'v' prefix (commonly used in git tags)",
222
+ "since": "2.0.0",
223
+ "signatures": [
224
+ {
225
+ "signature": "parse(version: string): ParsedVersion",
226
+ "description": "Parses a semantic version string into its components according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, -0.3.7, -x.7.z.92\n- Build metadata: +build, +sha.abc123, +20130313144700\n- Optional 'v' prefix (commonly used in git tags)",
227
+ "params": [
228
+ {
229
+ "name": "version",
230
+ "type": "string",
231
+ "description": "Version string to parse"
232
+ }
233
+ ],
234
+ "returns": {
235
+ "type": "ParsedVersion",
236
+ "description": "Parsed version object with major, minor, patch, prerelease, and build"
237
+ }
238
+ },
239
+ {
240
+ "signature": "parse(version: undefined): undefined",
241
+ "description": "Parses a semantic version string into its components according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, -0.3.7, -x.7.z.92\n- Build metadata: +build, +sha.abc123, +20130313144700\n- Optional 'v' prefix (commonly used in git tags)",
242
+ "params": [
243
+ {
244
+ "name": "version",
245
+ "type": "undefined",
246
+ "description": "Version string to parse"
247
+ }
248
+ ],
249
+ "returns": {
250
+ "type": "undefined",
251
+ "description": "Parsed version object with major, minor, patch, prerelease, and build"
252
+ }
253
+ },
254
+ {
255
+ "signature": "parse(version: null): null",
256
+ "description": "Parses a semantic version string into its components according to SemVer 2.0.0 specification\n\nSupports:\n- Core version: MAJOR.MINOR.PATCH\n- Pre-release: -alpha, -beta.1, -rc.1, -0.3.7, -x.7.z.92\n- Build metadata: +build, +sha.abc123, +20130313144700\n- Optional 'v' prefix (commonly used in git tags)",
257
+ "params": [
258
+ {
259
+ "name": "version",
260
+ "type": "null",
261
+ "description": "Version string to parse"
262
+ }
263
+ ],
264
+ "returns": {
265
+ "type": "null",
266
+ "description": "Parsed version object with major, minor, patch, prerelease, and build"
267
+ }
268
+ }
269
+ ],
270
+ "examples": [
271
+ {
272
+ "title": "Parse a semver string",
273
+ "description": "Breaks a semantic version string into its components.",
274
+ "code": "parse('1.2.3')\n// => { major: 1, minor: 2, patch: 3, prerelease: [], build: [] }"
275
+ },
276
+ {
277
+ "title": "Parse a prerelease version",
278
+ "description": "Handles prerelease identifiers and optional v prefix.",
279
+ "code": "parse('v2.0.0-alpha.1')\n// => { major: 2, minor: 0, patch: 0, prerelease: ['alpha', '1'], build: [] }"
280
+ }
281
+ ],
282
+ "sourceFile": "parse.ts",
283
+ "relatedTypes": [
284
+ {
285
+ "name": "ParsedVersion",
286
+ "description": "Represents a parsed semantic version according to SemVer 2.0.0 specification",
287
+ "typeDefinition": "interface ParsedVersion {\n build: string[];\n major: number;\n minor: number;\n patch: number;\n prerelease: string[];\n}"
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ "name": "satisfiesRange",
293
+ "kind": "function",
294
+ "description": "Checks if a version satisfies a range (simple implementation)",
295
+ "since": "1.9.0",
296
+ "signatures": [
297
+ {
298
+ "signature": "satisfiesRange(version: string, range: string): boolean",
299
+ "description": "Checks if a version satisfies a range (simple implementation)",
300
+ "params": [
301
+ {
302
+ "name": "version",
303
+ "type": "string",
304
+ "description": "Version to check"
305
+ },
306
+ {
307
+ "name": "range",
308
+ "type": "string",
309
+ "description": "Range pattern (e.g., \">=1.0.0\", \"~1.2.0\", \"^1.0.0\")"
310
+ }
311
+ ],
312
+ "returns": {
313
+ "type": "boolean",
314
+ "description": "True if version satisfies the range"
315
+ }
316
+ }
317
+ ],
318
+ "examples": [
319
+ {
320
+ "title": "Check caret range",
321
+ "description": "Caret (^) allows patch and minor updates within the same major.",
322
+ "code": "satisfiesRange('1.2.3', '^1.0.0')\n// => true"
323
+ },
324
+ {
325
+ "title": "Check greater-than-or-equal range",
326
+ "description": "The >= operator checks if the version is at least the specified value.",
327
+ "code": "satisfiesRange('2.0.0', '>=1.5.0')\n// => true"
328
+ },
329
+ {
330
+ "title": "Out of range",
331
+ "description": "Returns false when the version does not satisfy the range.",
332
+ "code": "satisfiesRange('0.9.0', '>=1.0.0')\n// => false"
333
+ }
334
+ ],
335
+ "sourceFile": "satisfiesRange.ts"
336
+ },
337
+ {
338
+ "name": "stringify",
339
+ "kind": "function",
340
+ "description": "Reconstruct a semantic version string from a ParsedVersion object.\n\nThis is the inverse of parse:\n`stringify(parse(v)) === stripV(v)` for any valid SemVer string `v`.",
341
+ "since": "next",
342
+ "signatures": [
343
+ {
344
+ "signature": "stringify(parsed: ParsedVersion): string",
345
+ "description": "Reconstruct a semantic version string from a ParsedVersion object.\n\nThis is the inverse of parse:\n`stringify(parse(v)) === stripV(v)` for any valid SemVer string `v`.",
346
+ "params": [
347
+ {
348
+ "name": "parsed",
349
+ "type": "ParsedVersion",
350
+ "description": "A parsed semantic version object."
351
+ }
352
+ ],
353
+ "returns": {
354
+ "type": "string",
355
+ "description": "The reconstructed version string (without leading `v`)."
356
+ }
357
+ },
358
+ {
359
+ "signature": "stringify(parsed: undefined): undefined",
360
+ "description": "Reconstruct a semantic version string from a ParsedVersion object.\n\nThis is the inverse of parse:\n`stringify(parse(v)) === stripV(v)` for any valid SemVer string `v`.",
361
+ "params": [
362
+ {
363
+ "name": "parsed",
364
+ "type": "undefined",
365
+ "description": "A parsed semantic version object."
366
+ }
367
+ ],
368
+ "returns": {
369
+ "type": "undefined",
370
+ "description": "The reconstructed version string (without leading `v`)."
371
+ }
372
+ },
373
+ {
374
+ "signature": "stringify(parsed: null): null",
375
+ "description": "Reconstruct a semantic version string from a ParsedVersion object.\n\nThis is the inverse of parse:\n`stringify(parse(v)) === stripV(v)` for any valid SemVer string `v`.",
376
+ "params": [
377
+ {
378
+ "name": "parsed",
379
+ "type": "null",
380
+ "description": "A parsed semantic version object."
381
+ }
382
+ ],
383
+ "returns": {
384
+ "type": "null",
385
+ "description": "The reconstructed version string (without leading `v`)."
386
+ }
387
+ }
388
+ ],
389
+ "examples": [
390
+ {
391
+ "title": "Reconstruct a stable version",
392
+ "description": "Converts a ParsedVersion object back to a version string.",
393
+ "code": "stringify({ major: 1, minor: 2, patch: 3, prerelease: [], build: [] })\n// => '1.2.3'"
394
+ },
395
+ {
396
+ "title": "Round-trip with parse",
397
+ "description": "stringify(parse(v)) returns the original version string (without leading v).",
398
+ "code": "stringify(parse('2.0.0-alpha.1'))\n// => '2.0.0-alpha.1'\n\nstringify(parse('1.0.0-beta+exp.sha.5114f85'))\n// => '1.0.0-beta+exp.sha.5114f85'"
399
+ }
400
+ ],
401
+ "sourceFile": "stringify.ts"
402
+ },
403
+ {
404
+ "name": "stripV",
405
+ "kind": "function",
406
+ "description": "Strip the leading \"v\" from a version string if it exists.",
407
+ "since": "1.9.0",
408
+ "signatures": [
409
+ {
410
+ "signature": "stripV(version: string): string",
411
+ "description": "Strip the leading \"v\" from a version string if it exists.",
412
+ "params": [
413
+ {
414
+ "name": "version",
415
+ "type": "string",
416
+ "description": "The version string to process"
417
+ }
418
+ ],
419
+ "returns": {
420
+ "type": "string",
421
+ "description": "The version string without leading \"v\", or the original value if it's not a string or doesn't start with \"v\""
422
+ }
423
+ },
424
+ {
425
+ "signature": "stripV(version: null): null",
426
+ "description": "Strip the leading \"v\" from a version string if it exists.",
427
+ "params": [
428
+ {
429
+ "name": "version",
430
+ "type": "null",
431
+ "description": "The version string to process"
432
+ }
433
+ ],
434
+ "returns": {
435
+ "type": "null",
436
+ "description": "The version string without leading \"v\", or the original value if it's not a string or doesn't start with \"v\""
437
+ }
438
+ },
439
+ {
440
+ "signature": "stripV(version: undefined): undefined",
441
+ "description": "Strip the leading \"v\" from a version string if it exists.",
442
+ "params": [
443
+ {
444
+ "name": "version",
445
+ "type": "undefined",
446
+ "description": "The version string to process"
447
+ }
448
+ ],
449
+ "returns": {
450
+ "type": "undefined",
451
+ "description": "The version string without leading \"v\", or the original value if it's not a string or doesn't start with \"v\""
452
+ }
453
+ }
454
+ ],
455
+ "examples": [
456
+ {
457
+ "title": "Remove v prefix from a version string",
458
+ "description": "Strips the leading \"v\" from a git tag-style version string.",
459
+ "code": "stripV('v1.2.3')\n// => '1.2.3'"
460
+ },
461
+ {
462
+ "title": "No-op when there is no v prefix",
463
+ "description": "Returns the string unchanged when it does not start with \"v\".",
464
+ "code": "stripV('1.2.3')\n// => '1.2.3'"
465
+ }
466
+ ],
467
+ "sourceFile": "stripV.ts"
468
+ }
469
+ ]
470
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "category": "version",
3
+ "label": "Version",
4
+ "smallDescription": "Version string manipulation utilities",
5
+ "description": "Utilities for working with version strings including parsing, validation, and version string transformation"
6
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "category": "version",
3
+ "functions": [
4
+ {
5
+ "name": "compare",
6
+ "examples": [
7
+ {
8
+ "title": "Compare two semver versions",
9
+ "description": "Returns -1, 0, or 1 based on SemVer ordering.",
10
+ "code": "compare('1.0.0', '2.0.0') // => -1\ncompare('1.0.0', '1.0.0') // => 0\ncompare('2.0.0', '1.0.0') // => 1"
11
+ },
12
+ {
13
+ "title": "Prerelease is lower than release",
14
+ "description": "A prerelease version is always less than the release.",
15
+ "code": "compare('1.0.0-alpha', '1.0.0')\n// => -1"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "name": "increment",
21
+ "examples": [
22
+ {
23
+ "title": "Increment the patch version",
24
+ "description": "Bumps the patch number while keeping major and minor.",
25
+ "code": "increment('1.2.3', 'patch')\n// => '1.2.4'"
26
+ },
27
+ {
28
+ "title": "Increment the minor version",
29
+ "description": "Bumps the minor number and resets patch to 0.",
30
+ "code": "increment('1.2.3', 'minor')\n// => '1.3.0'"
31
+ },
32
+ {
33
+ "title": "Preserve the v prefix",
34
+ "description": "The v prefix is preserved if present in the input.",
35
+ "code": "increment('v1.0.0', 'major')\n// => 'v2.0.0'"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "name": "isPrerelease",
41
+ "examples": [
42
+ {
43
+ "title": "Detect a prerelease version",
44
+ "description": "Returns true for any version string that contains a prerelease suffix.",
45
+ "code": "isPrerelease('2.0.0-alpha.1') // true\nisPrerelease('1.0.0-rc.0') // true"
46
+ },
47
+ {
48
+ "title": "Stable versions return false",
49
+ "description": "Returns false when the version has no prerelease suffix.",
50
+ "code": "isPrerelease('1.0.0') // false\nisPrerelease('2.1.3') // false"
51
+ },
52
+ {
53
+ "title": "Accept a ParsedVersion object",
54
+ "description": "Works with the result of parse() — checks the prerelease array instead of string matching.",
55
+ "code": "isPrerelease(parse('2.0.0-alpha.1')) // true\nisPrerelease(parse('1.0.0')) // false"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "name": "parse",
61
+ "examples": [
62
+ {
63
+ "title": "Parse a semver string",
64
+ "description": "Breaks a semantic version string into its components.",
65
+ "code": "parse('1.2.3')\n// => { major: 1, minor: 2, patch: 3, prerelease: [], build: [] }"
66
+ },
67
+ {
68
+ "title": "Parse a prerelease version",
69
+ "description": "Handles prerelease identifiers and optional v prefix.",
70
+ "code": "parse('v2.0.0-alpha.1')\n// => { major: 2, minor: 0, patch: 0, prerelease: ['alpha', '1'], build: [] }"
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "name": "satisfiesRange",
76
+ "examples": [
77
+ {
78
+ "title": "Check caret range",
79
+ "description": "Caret (^) allows patch and minor updates within the same major.",
80
+ "code": "satisfiesRange('1.2.3', '^1.0.0')\n// => true"
81
+ },
82
+ {
83
+ "title": "Check greater-than-or-equal range",
84
+ "description": "The >= operator checks if the version is at least the specified value.",
85
+ "code": "satisfiesRange('2.0.0', '>=1.5.0')\n// => true"
86
+ },
87
+ {
88
+ "title": "Out of range",
89
+ "description": "Returns false when the version does not satisfy the range.",
90
+ "code": "satisfiesRange('0.9.0', '>=1.0.0')\n// => false"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "name": "stringify",
96
+ "examples": [
97
+ {
98
+ "title": "Reconstruct a stable version",
99
+ "description": "Converts a ParsedVersion object back to a version string.",
100
+ "code": "stringify({ major: 1, minor: 2, patch: 3, prerelease: [], build: [] })\n// => '1.2.3'"
101
+ },
102
+ {
103
+ "title": "Round-trip with parse",
104
+ "description": "stringify(parse(v)) returns the original version string (without leading v).",
105
+ "code": "stringify(parse('2.0.0-alpha.1'))\n// => '2.0.0-alpha.1'\n\nstringify(parse('1.0.0-beta+exp.sha.5114f85'))\n// => '1.0.0-beta+exp.sha.5114f85'"
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "name": "stripV",
111
+ "examples": [
112
+ {
113
+ "title": "Remove v prefix from a version string",
114
+ "description": "Strips the leading \"v\" from a git tag-style version string.",
115
+ "code": "stripV('v1.2.3')\n// => '1.2.3'"
116
+ },
117
+ {
118
+ "title": "No-op when there is no v prefix",
119
+ "description": "Returns the string unchanged when it does not start with \"v\".",
120
+ "code": "stripV('1.2.3')\n// => '1.2.3'"
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "category": "version",
3
+ "dependencies": []
4
+ }
package/package.json CHANGED
@@ -1,36 +1,51 @@
1
1
  {
2
2
  "name": "@helpers4/version",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.21",
4
4
  "description": "A set of helpers in TS/JS, compatible with tree-shaking, for version.",
5
5
  "author": "baxyz <baxy@etik.com>",
6
- "license": "AGPL-3.0",
6
+ "license": "LGPL-3.0",
7
+ "homepage": "https://helpers4.dev/typescript/categories/version/",
7
8
  "repository": {
8
9
  "type": "git",
9
- "url": "git+https://github.com/helpers4/helpers4.git"
10
+ "url": "git+https://github.com/helpers4/typescript.git"
10
11
  },
11
12
  "type": "module",
13
+ "sideEffects": false,
12
14
  "main": "lib/index.js",
13
15
  "types": "lib/index.d.ts",
14
16
  "exports": {
15
17
  ".": {
16
18
  "types": "./lib/index.d.ts",
17
19
  "import": "./lib/index.js"
18
- }
20
+ },
21
+ "./meta/api.json": "./meta/api.json",
22
+ "./meta/examples.json": "./meta/examples.json",
23
+ "./meta/licenses.json": "./meta/licenses.json",
24
+ "./llms.txt": "./llms.txt",
25
+ "./package.json": "./package.json"
19
26
  },
20
27
  "keywords": [
21
28
  "helpers",
22
29
  "version",
23
- "stripV",
24
30
  "compare",
31
+ "increment",
32
+ "isPrerelease",
33
+ "parse",
25
34
  "satisfiesRange",
26
- "increment"
35
+ "stringify",
36
+ "stripV"
27
37
  ],
28
38
  "files": [
29
39
  "lib/index.js",
30
40
  "lib/index.d.ts",
31
41
  "lib/index.js.map",
42
+ "meta/",
43
+ "llms.txt",
32
44
  "LICENSE.md",
33
45
  "package.json",
34
46
  "README.md"
35
- ]
47
+ ],
48
+ "engines": {
49
+ "node": ">=18.0.0"
50
+ }
36
51
  }