data_wait.js

/**
 * @function wait
 * @description Wait for a given number of milliseconds.
 *
 * @since 5.0.2
 *
 * @async
 *
 * @param {number} ms The number of milliseconds to wait.
 *
 * @return {Promise<void>} A promise that resolves when the wait is complete.
 */
const wait = async ( ms = 0 ) => new Promise( ( resolve ) => setTimeout( resolve, ms ) );

export default wait;