Comparing version 5.0.1 to 5.0.2
@@ -11,3 +11,3 @@ export class TimeoutError extends Error { | ||
const cancelablePromise = new Promise((resolve, reject) => { | ||
if (typeof milliseconds !== 'number' || milliseconds < 0) { | ||
if (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) { | ||
throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``); | ||
@@ -14,0 +14,0 @@ } |
{ | ||
"name": "p-timeout", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "Timeout a promise after a specified amount of time", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
9210