MCPcopy Create free account
hub / github.com/Marus/cortex-debug / startWithStream

Method startWithStream

src/common.ts:832–839  ·  view source on GitHub ↗
(rStream: stream.Readable, cb: (line: string) => boolean = null)

Source from the content-addressed store, hash-verified

830 }
831
832 public startWithStream(rStream: stream.Readable, cb: (line: string) => boolean = null): Promise<boolean> {
833 if (this.promise) { throw new Error('SpawnLineReader: can\'t reuse this object'); }
834 this.callback = cb;
835 this.promise = new Promise<boolean>((resolve) => {
836 this.doReadline(rStream, resolve);
837 });
838 return this.promise;
839 }
840
841 public startWithFile(filename: fs.PathLike, options: string | any = null, cb: (line: string, err?: any) => boolean = null): Promise<boolean> {
842 if (this.promise) { throw new Error('SpawnLineReader: can\'t reuse this object'); }

Callers

nothing calls this directly

Calls 1

doReadlineMethod · 0.95

Tested by

no test coverage detected