Skip to main content

Prerelease

Optional pre-release identifier on a version string. This comes after - in a SemVer version, like 1.0.0-alpha.1

Spec: https://docs.rs/semver/1.0.20/semver/struct.Prerelease.html

Properties

EMPTY

This item is read only and cannot be modified. Read OnlyStatic
Prerelease.EMPTY: Prerelease

Usage:

local ver = Version.new(1, 0, 0, Prerelease.EMPTY, BuildMetadata.EMPTY)

Functions

new

Prerelease.new(inputstring) → Prerelease

is

Prerelease.is(objany) → boolean

Returns true if obj is a Prerelease.

is_empty

Prerelease:is_empty() → boolean

__tostring

Prerelease:__tostring() → string

This metamethod transforms self into a string.

__len

Prerelease:__len() → number

This metamethod returns the length of self and is used by the # length operator.

__eq

Prerelease:__eq(otherPrerelease) → boolean

This metamethod tests for self and other values to be equal and is used by the operators == and ~=.

__lt

Prerelease:__lt(otherPrerelease) → boolean

This metamethod tests less than (for self and other) and is used by the operators < and >.

__le

Prerelease:__le(otherPrerelease) → boolean

This metamethod tests less than or equal to (for self and other) and is used by the operators <= and >=.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "input",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Prerelease\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "_new_unchecked",
            "desc": "",
            "params": [
                {
                    "name": "identifier",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Prerelease\n"
                }
            ],
            "function_type": "static",
            "private": true,
            "source": {
                "line": 46,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "is",
            "desc": "Returns `true` if `obj` is a [Prerelease].",
            "params": [
                {
                    "name": "obj",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 55,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "is_empty",
            "desc": "",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 64,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "__tostring",
            "desc": "This metamethod transforms `self` into a string.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 74,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "__len",
            "desc": "This metamethod returns the length of `self` and is used by the `#` length operator.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 84,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "__eq",
            "desc": "This metamethod tests for `self` and `other` values to be equal and is used by the operators `==` and `~=`.",
            "params": [
                {
                    "name": "other",
                    "desc": "",
                    "lua_type": "Prerelease"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 95,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "__lt",
            "desc": "This metamethod tests less than (for `self` and `other`) and is used by the operators `<` and `>`.",
            "params": [
                {
                    "name": "other",
                    "desc": "",
                    "lua_type": "Prerelease"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 120,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        },
        {
            "name": "__le",
            "desc": "This metamethod tests less than or equal to (for `self` and `other`) and is used by the operators `<=` and `>=`.",
            "params": [
                {
                    "name": "other",
                    "desc": "",
                    "lua_type": "Prerelease"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 173,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "EMPTY",
            "desc": "**Usage:**\n```lua\nlocal ver = Version.new(1, 0, 0, Prerelease.EMPTY, BuildMetadata.EMPTY)\n```",
            "lua_type": "Prerelease",
            "tags": [
                "Static"
            ],
            "readonly": true,
            "source": {
                "line": 187,
                "path": "lib/CargoSemver/src/Prerelease.luau"
            }
        }
    ],
    "types": [],
    "name": "Prerelease",
    "desc": "Optional pre-release identifier on a version string. This comes after `-` in a SemVer version, like `1.0.0-alpha.1`\n\nSpec: https://docs.rs/semver/1.0.20/semver/struct.Prerelease.html",
    "source": {
        "line": 28,
        "path": "lib/CargoSemver/src/Prerelease.luau"
    }
}