2.1.3 • Published 6 years ago

sleep-sync v2.1.3

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

sleep sync

NPM version Build status License Code style

Block execution synchronously

Why?

Obviously this is counter to everything we know about not blocking the event loop I wrote this simple wrapper for testing purposes. Sometimes it's useful to simulate the blocking of the event loop, so we can work on how to handle that scenario from outside of Node.

Installation

$ npm install --save sleep-sync

Usage

const sleep = require('sleep-sync')

doStuffAsync()

sleep(333) // block ALL execution for 333 milliseconds

doMoreStuff()
2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago