mirror of
https://github.com/timheuer/base64-to-file
synced 2024-05-20 13:19:37 +02:00
12 lines
271 B
JavaScript
12 lines
271 B
JavaScript
let wait = function(milliseconds) {
|
|
return new Promise((resolve, reject) => {
|
|
if (typeof(milliseconds) !== 'number') {
|
|
throw new Error('milleseconds not a number');
|
|
}
|
|
|
|
setTimeout(() => resolve("done!"), milliseconds)
|
|
});
|
|
}
|
|
|
|
module.exports = wait;
|