Shared

print

Usage

Lib.print(message, type)
  • message: string

  • type(optional): "error" or "success" or "info"

Example

Lib.print(message)

debug

Usage

Lib.debug(value, indent)
  • value: any

  • indent(optional): number

    • default: 0

Example

Lib.debug({
    age = 25,
    name = "Keyton Johnson",
})

refInt

Usage

Lib.refInt(int)
  • int: number

Example

Lib.refInt(5000)
  • return: string

missingValue

Usage

Lib.missingValue(int1, int2)
  • int1: number

  • int2: number

Example

Lib.missingValue(5000, 2500)
  • return: number

roundTo

Usage

Lib.roundTo(int, round)
  • int: number

  • round: number

Example

Lib.roundTo(50.4782, 2)
  • return: number

checkSuccess

Usage

Lib.checkSuccess(int)
  • int: number

Example

Lib.checkSuccess(50)
  • return: boolean

randomString

Usage

Lib.randomString(length, pattern)
  • length: number

  • pattern: "A" - letters or "a" - small letters or 0 - numbers or nil - letters, small letters, numbers

Example

Lib.randomString(30, nil)

return: string or number

isExportAvailable

Usage

Lib.isExportAvailable(resource, func)
  • resource: string

  • func: function

Example

Lib.isExportAvailable("resource", test)
  • return: boolean

capitalizeFirstLetter

Usage

Lib.capitalizeFirstLetter(text)
  • text: string

Example

Lib.capitalizeFirstLetter("test")
  • return: string

copyTable

Usage

Lib.copyTable(value)
  • value: object or array

Example

Lib.copyTable({
    age = 25,
    name = "Keyton Johnson",
})
  • return: object or array

Last updated