79604738

Date: 2025-05-03 13:24:23
Score: 0.5
Natty:
Report link

You can now map async iterators by passing a function as a second parameter to Array.fromAsync:

async function *asyncGen() {
  yield 45;
  yield 5;
  yield 98;
}

const results = await Array.fromAsync(asyncGen(), (v) => v + 10);

console.log(results);

// [ 55, 15, 108 ]
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: MJ Walsh