mirror of
https://github.com/0x5eal/semver-luau.git
synced 2024-12-12 15:00:36 +00:00
chore(README): treat imported semver as class
This commit is contained in:
parent
30c104d844
commit
8a89d50590
1 changed files with 3 additions and 3 deletions
|
@ -28,17 +28,17 @@ Invalid versions should return a [`Result`] with the respective error. If not, t
|
||||||
filing an issue [here](https://github.com/0x5eal/semver-luau/issues).
|
filing an issue [here](https://github.com/0x5eal/semver-luau/issues).
|
||||||
|
|
||||||
```luau
|
```luau
|
||||||
local semver = require("semver")
|
local Semver = require("semver")
|
||||||
|
|
||||||
-- Parse version strings
|
-- Parse version strings
|
||||||
local v1 = semver.parse("1.2.3"):unwrap() --[[
|
local v1 = Semver.parse("1.2.3"):unwrap() --[[
|
||||||
major = 1,
|
major = 1,
|
||||||
minor = 2,
|
minor = 2,
|
||||||
patch = 3,
|
patch = 3,
|
||||||
buildMetadata = Option::None,
|
buildMetadata = Option::None,
|
||||||
prerelease = Option::None
|
prerelease = Option::None
|
||||||
]]
|
]]
|
||||||
local v2 = semver.parse("5.12.0+build.1731248766"):unwrap() --[[
|
local v2 = Semver.parse("5.12.0+build.1731248766"):unwrap() --[[
|
||||||
major = 5,
|
major = 5,
|
||||||
minor = 12,
|
minor = 12,
|
||||||
patch = 0,
|
patch = 0,
|
||||||
|
|
Loading…
Reference in a new issue