MCPcopy Index your code
hub / github.com/nodejs/node / oneTo5Async

Function oneTo5Async

test/parallel/test-stream-some-find-every.mjs:11–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9}
10
11function oneTo5Async() {
12 return oneTo5().map(async (x) => {
13 await Promise.resolve();
14 return x;
15 });
16}
17{
18 // Some, find, and every work with a synchronous stream and predicate
19 assert.strictEqual(await oneTo5().some((x) => x > 3), true);

Callers 1

Calls 3

oneTo5Function · 0.70
mapMethod · 0.65
resolveMethod · 0.45

Tested by

no test coverage detected