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

Function consumeStart

github-actions/browserstack/set-browserstack-env.js:9837–9863  ·  view source on GitHub ↗
(consume2)

Source from the content-addressed store, hash-verified

9835 this[kReading] = false;
9836 }
9837 destroy(err) {
9838 if (!err && !this._readableState.endEmitted) {
9839 err = new RequestAbortedError();
9840 }
9841 if (err) {
9842 this[kAbort]();
9843 }
9844 return super.destroy(err);
9845 }
9846 _destroy(err, callback) {
9847 if (!this[kReading]) {
9848 setImmediate(() => {
9849 callback(err);
9850 });
9851 } else {
9852 callback(err);
9853 }
9854 }
9855 on(ev, ...args) {
9856 if (ev === "data" || ev === "readable") {
9857 this[kReading] = true;
9858 }
9859 return super.on(ev, ...args);
9860 }
9861 addListener(ev, ...args) {
9862 return this.on(ev, ...args);
9863 }
9864 off(ev, ...args) {
9865 const ret = super.off(ev, ...args);
9866 if (ev === "data" || ev === "readable") {

Callers 1

consumeFunction · 0.70

Calls 4

consumePushFunction · 0.70
consumeEndFunction · 0.70
onMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected