@hapi/hoek
Advanced tools
Comparing version 9.0.4 to 9.1.0
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -11,3 +11,3 @@ 'use strict'; | ||
return new Promise(Ignore); // $lab:coverage:ignore$ | ||
return new Promise(Ignore); | ||
}; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -122,4 +122,4 @@ 'use strict'; | ||
for (const entry of obj) { | ||
if (!ref.has(entry)) { | ||
for (const entry of Set.prototype.values.call(obj)) { | ||
if (!Set.prototype.has.call(ref, entry)) { | ||
return false; | ||
@@ -174,4 +174,4 @@ } | ||
const ref2 = new Set(ref); | ||
for (const objEntry of obj) { | ||
const ref2 = new Set(Set.prototype.values.call(ref)); | ||
for (const objEntry of Set.prototype.values.call(obj)) { | ||
if (ref2.delete(objEntry)) { | ||
@@ -201,8 +201,8 @@ continue; | ||
for (const [key, value] of obj) { | ||
if (value === undefined && !ref.has(key)) { | ||
for (const [key, value] of Map.prototype.entries.call(obj)) { | ||
if (value === undefined && !Map.prototype.has.call(ref, key)) { | ||
return false; | ||
} | ||
if (!isDeepEqual(value, ref.get(key), options, seen)) { | ||
if (!isDeepEqual(value, Map.prototype.get.call(ref, key), options, seen)) { | ||
return false; | ||
@@ -209,0 +209,0 @@ } |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -436,6 +436,7 @@ /// <reference types="node" /> | ||
* @param timeout - The number of milliseconds to wait before resolving the Promise. | ||
* @param returnValue - The value that the Promise will resolve to. | ||
* | ||
* @return A Promise. | ||
* @return A Promise that resolves with `returnValue`. | ||
*/ | ||
export function wait(timeout?: number): Promise<void>; | ||
export function wait<T>(timeout?: number, returnValue?: T): Promise<T>; | ||
@@ -442,0 +443,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -6,5 +6,9 @@ 'use strict'; | ||
module.exports = function (timeout) { | ||
module.exports = function (timeout, returnValue) { | ||
return new Promise((resolve) => setTimeout(resolve, timeout)); | ||
if (typeof timeout !== 'number' && timeout !== undefined) { | ||
throw new TypeError('Timeout must be a number'); | ||
} | ||
return new Promise((resolve) => setTimeout(resolve, timeout, returnValue)); | ||
}; |
@@ -0,0 +0,0 @@ Copyright (c) 2011-2020, Sideway Inc, and project contributors |
{ | ||
"name": "@hapi/hoek", | ||
"description": "General purpose node utilities", | ||
"version": "9.0.4", | ||
"version": "9.1.0", | ||
"repository": "git://github.com/hapijs/hoek", | ||
@@ -17,3 +17,3 @@ "main": "lib/index.js", | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "22.x.x" | ||
"@hapi/lab": "^23.0.0" | ||
}, | ||
@@ -20,0 +20,0 @@ "scripts": { |
@@ -0,0 +0,0 @@ <a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a> |
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
1468
50787
1