main-thread-scheduling
Advanced tools
Comparing version 7.0.0 to 7.1.0
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23084