File "sleeper.js"

Full path: /home/satkhirabarta/public_html/wp-content/plugins/really-simple-ssl/settings/src/utils/sleeper.js
File size: 264 B (264 B bytes)
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

/*
 * helper function to delay after a promise
 * @param ms
 * @returns {function(*): Promise<unknown>}
 */
const sleeper = (ms) => {
    return function(x) {
        return new Promise(resolve => setTimeout(() => resolve(x), ms));
    };
}
export default sleeper;