JSPM

  • Created
  • Published
  • Downloads 110
  • Score
    100M100P100Q113408F
  • License MIT

cancellableDelay a delay that can be cancelled

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@quenty/cancellabledelay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    cancellableDelay

    cancellableDelay a delay that can be cancelled

    Installation

    npm install @quenty/cancellabledelay --save

    Usage

    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)