15 lines
337 B
JavaScript
15 lines
337 B
JavaScript
|
'use strict';
|
||
|
/**
|
||
|
* 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;
|
||
|
//# sourceMappingURL=index.js.map
|