diff --git a/utils.js b/utils.js index 794594c..dc4ab64 100644 --- a/utils.js +++ b/utils.js @@ -67,9 +67,16 @@ function RGB_to_HSL(rgb) { }; } +function asyncTimeout(timeout) { + return new Promise(resolve => { + setTimeout(resolve, timeout); + }); +} + module.exports = { fillPartialHSL, clamp, HSL_to_RGB, RGB_to_HSL, + asyncTimeout, }; \ No newline at end of file