@applitools/functional-commons
Advanced tools
Comparing version 1.0.37 to 1.0.39
{ | ||
"name": "@applitools/functional-commons", | ||
"version": "1.0.37", | ||
"version": "1.0.39", | ||
"description": "", | ||
@@ -37,3 +37,3 @@ "main": "src/functional-commons.js", | ||
"chai": "^4.2.0", | ||
"eslint": "^5.12.1", | ||
"eslint": "^5.13.0", | ||
"eslint-plugin-mocha-no-only": "^1.1.0", | ||
@@ -43,4 +43,4 @@ "eslint-plugin-node": "^8.0.1", | ||
"mocha": "^5.2.0", | ||
"prettier": "^1.16.1" | ||
"prettier": "^1.16.4" | ||
} | ||
} |
@@ -237,9 +237,18 @@ 'use strict' | ||
let cancel | ||
const v = await Promise.race([ | ||
promise.then( | ||
v => ((promiseResolved = true), v), | ||
err => ((promiseResolved = true), Promise.reject(err)), | ||
v => ((promiseResolved = true), cancel && clearTimeout(cancel), v), | ||
err => ((promiseResolved = true), cancel && clearTimeout(cancel), Promise.reject(err)), | ||
), | ||
p(setTimeout)(timeout).then(() => | ||
promiseResolved ? undefined : ((promiseResolved = true), func()), | ||
new Promise( | ||
res => | ||
(cancel = setTimeout(() => { | ||
if (promiseResolved) res(undefined) | ||
else { | ||
cancel = undefined | ||
promiseResolved = true | ||
res(func()) | ||
} | ||
}, timeout)), | ||
), | ||
@@ -246,0 +255,0 @@ ]) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
21381
325
1