Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ircam/blocked

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ircam/blocked

test for blockage in event loop

latest
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
9
800%
Maintainers
4
Weekly downloads
 
Created
Source

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();

FAQs

Package last updated on 21 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts