const asyncIterator = array => ({ [Symbol.asyncIterator]: () => { return { next: () => Promise.resolve({ done: array.length === 0, value: array.shift() }) } } }) export default asyncIterator;