Condition

generateIfNotEmpty

Signature: generateIfNotEmpty(toBeCheck: string, content: string)

Generate content if the string is not empty.

Examples:

Expression
generateIfNotEmpty("", "test")
Output
Expression
generateIfNotEmpty("a", "test")
Output
test

generateIfEmpty

Signature: generateIfEmpty(toBeCheck: string, content: string)

Generate content if the string is empty.

Examples:

Expression
generateIfEmpty("", "test")
Output
test
Expression
generateIfEmpty("a", "test")
Output

generateIfNot

Signature: generateIfNot(condition: boolean, content: string)

Generate content if the condition is false.

Examples:

Expression
generateIfNot(true, "test")
Output
Expression
generateIfNot(false, "test")
Output
test

generateIf

Signature: generateIf(condition: string, content: string)

Generate content if the condition is true.

Examples:

Expression
generateIf(true, "test")
Output
test
Expression
generateIf(false, "test")
Output