1.0.1 • Published 7 years ago
set-timeout-sync v1.0.1
set-timeout-sync

A blocking, synchronous imitation of setTimeout.
Installation
npm install set-timeout-syncUsage
const setTimeoutSync = require('set-timeout-sync')
console.log("I'm first")
setTimeoutSync(function() {
console.log("I'm blocking!")
}, 2000)
console.log("I'm last")
// I'm first
// <wait 2000ms>
// I'm blocking!
// I'm lastLicense
This project is open source and available under the MIT License.