Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
jajbshjahavahh
GitHub Repository: jajbshjahavahh/Gojo-Satoru
Path: blob/master/node_modules/@hapi/hoek/lib/wait.js
2593 views
1
'use strict';
2
3
const internals = {};
4
5
6
module.exports = function (timeout, returnValue) {
7
8
if (typeof timeout !== 'number' && timeout !== undefined) {
9
throw new TypeError('Timeout must be a number');
10
}
11
12
return new Promise((resolve) => setTimeout(resolve, timeout, returnValue));
13
};
14
15