import sleep from "../utils/sleep"; async function rapid(str, conditionNumber) { let count = 0; // 1 = 2; 2 = 3; async function goRapid() { count = count + 1; let array = str.split(""); str = array[0]; array.shift(); for (let ix in array) { await sleep(40); let index = Number(ix); str += `${array[index]}`; process.title = str; if (index + 1 === array.length && count <= array.length) { process.title = ""; if (count !== conditionNumber) goRapid(); } } } goRapid(); } export { rapid };