Start typing to search packages!
carrot
By @griffin-dalby
Roblox
Mirrored from WallyThis version ships no README. Showing the README from v0.1.0, mirrored from wally.
carrot 🥕
Lightweight & efficient semver parsing & range matching for LuaU. All syntax and comparison ideology is derived from NPM semver syntax. Specifics are listed in the cheatsheet.
API
Cheatsheet
Range parsing syntax
| Range | Comparison | Notes |
|---|---|---|
~1.2.3 | is >=1.2.3 <1.3.0 | |
^1.2.3 | is >=1.2.3 <2.0.0 | |
^0.2.3 | is >=0.2.3 <0.3.0 | |
^0.0.1 | is ==0.0.1 | |
^1.2 | is >=1.2.0 <2.0.0 | (like ^1.2.0) |
~1.2 | is >=1.2.0 <1.3.0 | (like ~1.2.0) |
^1 | is >1.0.0 <2.0.0 | |
1.x | same | |
1 | same | |
* | any version | |
x | same |
Wildcard Explanation
Wildcards act as placeholders in version strings, any place that has a wildcard will be replaced with a zero.
| Wildcard | Example | Final |
|---|---|---|
x | 1.x.x | 1.0.0 |
X | 3.2.X | 3.2.0 |
* | 2.* | 2.0.0 |
Partial Explanation
When a version is "partial", is does not have all three places. The missing places will be replaced with zeros.
| Partial | Final |
|---|---|
| 1.2 | 1.2.0 |
| 2.5 | 2.5.0 |
Operator Explanation
Operators are used specifically when defining what ranges are needed. It acts as a shorthand for defining a specific range.
| Operator | Description |
|---|---|
^ | means "compatible with" |
~ | means "reasonably close to" |
License
This framework (carrot) is licensed under MIT, meaning you can implement this into your project in any way that you see fit, but attributions to me within any files must be kept.
Package Details
Install command (Click to copy)
Version
0.2.3
License
MIT
Safe for commercial use
License identified from the packaged LICENSE file; the manifest declared none.
Automated license review — not legal advice.
