iguana.isTest()

The iguana.isTest() function checks if the script is running in the Translator editor (test mode). It returns true when the script is running in the Translator (test mode) and false when the script is running in a live component.

It’s often used with to conditionally execute specific actions.

if iguana.isTest() then -- execute actions that I do not want to run live end if not iguana.isTest() then -- execuate actions that I do not want to run in the editor (test mode) end

This function can be very handy when you want to avoid running code while editing. For instance, you may only want to perform a file write operation when the component is running live.

Â