Socket
Socket
Sign inDemoInstall

@ircam/blocked

Package Overview
Dependencies
0
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ircam/blocked

test for blockage in event loop


Version published
Weekly downloads
8
increased by300%
Maintainers
4
Install size
116 kB
Created
Weekly downloads
 

Readme

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

Last updated on 21 Dec 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc