applyUnless

inline fun <T> T.applyUnless(condition: Boolean, block: T.() -> Unit): T

Runs block on this receiver when condition is false and returns the receiver.

The negated counterpart of applyIf.

Return

the receiver, for chaining.

Parameters

condition

whether to skip block.

block

configuration to apply to the receiver.