I have a asynchronous loop for getting payload:
let payload = "";
for await (const chunk of body) {
payload += chunk;
}
But this code is no supported by ESLint:
error iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations no-restricted-syntax
How to implement for-await-of to supported loop format by ESLint, eg. forEach(), map(), reduce()? As asynchronous function?