2019-02-08 19:07:35 +00:00
|
|
|
'use strict';
|
2023-03-01 18:35:45 +00:00
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
exports.delay = void 0;
|
2019-03-21 19:02:05 +00:00
|
|
|
/**
|
|
|
|
* Delay in an async/await function
|
|
|
|
*
|
|
|
|
* @param {integer} ms Milliseconds to delay for
|
|
|
|
*
|
|
|
|
* @returns {Promise} Promise to resolve after timeout
|
|
|
|
**/
|
|
|
|
function delay(ms) {
|
|
|
|
return new Promise((resolve) => {
|
2024-05-23 22:49:18 +00:00
|
|
|
return setTimeout(() => { resolve(ms); }, ms);
|
2019-03-21 19:02:05 +00:00
|
|
|
});
|
2019-02-08 19:07:35 +00:00
|
|
|
}
|
2023-03-01 18:35:45 +00:00
|
|
|
exports.delay = delay;
|
|
|
|
module.exports = { delay };
|
2019-03-21 19:02:05 +00:00
|
|
|
//# sourceMappingURL=index.js.map
|