Skip to main content

Lithium

Lithium is an instance for simulating network calls that can yield and fail.

Constructor​

local lithium = Lithium.new()

Parameters​

TypeNameDefaultDescription
Dictionaryconfig{}Configuration dictionary

Functions​

Return TypeSignatureDescription
voidmakeCall()Simulate a network call based on the instance's config.
DictionarymodifyConfig(Dictionary config)Update the instance's config with the new values. Returns the final configuration.

makeCall​

This function simulates a network call based on the instance's config.

lithium:makeCall()

modifyConfig​

This function updates the instance's config with the new values and returns the final configuration.

Parameters​

TypeNameDefaultDescription
DictionaryconfigThe config modifications.