@clearcodehq/synchronous-timeout

Utility to allow setting timeouts that work synchronously

Usage no npm install needed!

<script type="module">
  import clearcodehqSynchronousTimeout from 'https://cdn.skypack.dev/@clearcodehq/synchronous-timeout';
</script>

README

Synchronous timeout

A simple utility that allows you to set a synchronous timeout in your application.

Installation

Add to your dependencies:

"dependencies": {
    "synchronous-timeout": "https://github.com/ClearcodeHQ/npm-synchronous-timeout.git"
}

Usage

const timeout = require("sychronous-timeout");
await timeout(5000); //set in miliseconds