Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

main-thread-scheduling

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

main-thread-scheduling - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

2

package.json
{
"name": "main-thread-scheduling",
"version": "7.0.0",
"version": "7.1.0",
"description": "Fast and consistently responsive apps using a single function call",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -12,2 +12,8 @@ import state from './state';

var _a, _b;
// - in Node.js context return immediately
// - this way we also support test environments (without jsdom added)
// - support for scheduling in Node.js is still under consideration for future versions
if (typeof requestAnimationFrame === 'undefined') {
return false;
}
// #performance, `performance.now()` is around 40% slower. also `Date.now()` is accurate enough

@@ -14,0 +20,0 @@ // for our use case

@@ -6,8 +6,2 @@ import yieldControl from './yieldControl';

export default function yieldOrContinue(priority) {
// - in Node.js context return immediately
// - this way we also support test environments (without jsdom added)
// - support for scheduling in Node.js is still under consideration for future versions
if (typeof requestAnimationFrame === 'undefined') {
return Promise.resolve();
}
if (isTimeToYield(priority)) {

@@ -14,0 +8,0 @@ return yieldControl(priority);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc