extensions

The extensions namespace is not actually a namespace that is accessible directly. Instead, this namespace is used, internally, to extend the functionality of Lua’s base types. (ie. boolean, coroutine, function, number, string, table, etc.)

coroutine Extensions

kill

Kills the current coroutine.

1coroutine.kill();
Parameter NameTypeDescription
None.
Returns
None.

sleep

Yields the current coroutine, sleeping for the given delay of time.

1coroutine.sleep(delay);
Parameter NameTypeDescription
delaynumberThe time delay to sleep for.
Returns
None.

sleepf

Yields the current coroutine, sleeping for the given delay of frames.

1coroutine.sleepf(delay);
Parameter NameTypeDescription
delaynumberThe frame delay to sleep for.
Returns
None.

table Extensions

toliteral

Converts the given table of numbers (bytes) to a string literal.

1string table.toliteral(table);
Parameter NameTypeDescription
tabletableThe table to convert to a string literal.
Returns
(string) The converted table to a string literal.