MCPcopy Create free account
hub / github.com/angular/dev-infra / stream

Function stream

github-actions/browserstack/set-browserstack-env.js:10399–10416  ·  view source on GitHub ↗
(opts, factory, callback)

Source from the content-addressed store, hash-verified

10397 }
10398 };
10399 function stream(opts, factory, callback) {
10400 if (callback === void 0) {
10401 return new Promise((resolve2, reject) => {
10402 stream.call(this, opts, factory, (err, data) => {
10403 return err ? reject(err) : resolve2(data);
10404 });
10405 });
10406 }
10407 try {
10408 this.dispatch(opts, new StreamHandler(opts, factory, callback));
10409 } catch (err) {
10410 if (typeof callback !== "function") {
10411 throw err;
10412 }
10413 const opaque = opts == null ? void 0 : opts.opaque;
10414 queueMicrotask(() => callback(err, { opaque }));
10415 }
10416 }
10417 module.exports = stream;
10418 }
10419 });

Callers

nothing calls this directly

Calls 1

dispatchMethod · 0.45

Tested by

no test coverage detected