cancellableDelay a delay that can be cancelled
npm install @quenty/cancellabledelay --save
Usage is pretty simple, it's a delay function that returns.
local cancel = cancellableDelay(2, function(arg)
print("Executing", arg)
end, 5)
delay(1, function()
cancel() -- cancel
end)