2019-10-11 21:54:29 +00:00
|
|
|
'use strict';
|
2019-10-11 22:24:41 +00:00
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2019-10-11 21:54:29 +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) => {
|
|
|
|
return setTimeout(resolve, ms);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
module.exports.delay = delay;
|
2019-10-11 22:24:41 +00:00
|
|
|
exports.default = delay;
|
2019-10-11 21:54:29 +00:00
|
|
|
//# sourceMappingURL=index.js.map
|