1.0.1 • Published 5 years ago

set-timeout-sync v1.0.1

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

set-timeout-sync License: MIT snekjs on NPM

A blocking, synchronous imitation of setTimeout.

Installation

npm install set-timeout-sync

Usage

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 last

License

This project is open source and available under the MIT License.

1.0.1

5 years ago

1.0.0

5 years ago