Standard

A library of miscellaneous functions.


Source: pkg/lua/lib/std.go | Import: std

Functions


log

log(msg)

Arguments

  • msg string - The message to display in the log.
log_value

log_value(value)

Arguments

  • value any - The value to display in the log.
warn

warn(msg)

Arguments

  • msg string - The message to display as a warning in the log.
panic

panic(msg)

This results in a lua panic.

Arguments

  • msg string - The message to display in the error.
sleep

sleep(ms)

Arguments

  • ms int - The number of milliseconds to sleep.
fmt

fmt(str, values...) -> string

Arguments

  • str string
  • values any...
Return Values

  • string
config

config() -> table<any>

Return Values

  • table<any>
secrets

secrets() -> table<any>

Return Values

  • table<any>
map_schema

map_schema(value, schema) -> table<any>

Arguments

  • value table<any>
  • schema table<any>
Return Values

  • table<any>
call_thread

call_thread(func)

This function will call the provided function in a new thread, unlike tasks there is no control over the thread. There is also no guarantee that the thread will finish before the script ends.

Arguments

  • func function() - The function to call in a new thread.
array_fill

array_fill(size, value) -> []any

Arguments

  • size int
  • value any
Return Values

  • []any - Note that some values are copied by reference.