1.1.2 • Published 3 years ago

@ircam/blocked v1.1.2

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
3 years ago

Blocked

Periodic test for event loop, in the browser or in node. Callback to report each time it was blocked.

Install

npm install [--save] @ircam/blocked

Example

It is the same usage within node or a web browser.

import Blocked from '@ircam/blocked';

const threshold = 100; // report blockage of more than 100 ms

const blocked = new Blocked( (duration) => {
    console.log(`Blocked for ${duration} ms`);
    }, threshold);

// that's it is runs in the background
// in case you want to stop it:
blocked.stop();
1.1.2

3 years ago

1.1.1

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

6 years ago