export default function* generateIDS(fromID) { while (true) { yield fromID++; } } // Example of usage // const generator = generateIDS(0); // const MichaelID = generator.next().value; // const DimaID = generator.next().value; // console.log(MichaelID); // 0 // console.log(DimaID); // 1