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

Function wait

lib/internal/streams/pipeline.js:111–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 };
110
111 const wait = () => new Promise((resolve, reject) => {
112 if (error) {
113 reject(error);
114 } else {
115 onresolve = () => {
116 if (error) {
117 reject(error);
118 } else {
119 resolve();
120 }
121 };
122 }
123 });
124
125 writable.on('drain', resume);
126 const cleanup = eos(writable, { readable: false }, resume);

Callers 1

pumpToNodeFunction · 0.70

Calls 2

rejectFunction · 0.50
resolveFunction · 0.50

Tested by

no test coverage detected