MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / constructor

Method constructor

js/botasaurus-server-js/src/ndjson.ts:11–25  ·  view source on GitHub ↗
(filePath: string, append = false)

Source from the content-addressed store, hash-verified

9 private writeStream: fs.WriteStream;
10
11 constructor(filePath: string, append = false) {
12 if (append) {
13 this.writeStream = fs.createWriteStream(filePath, {
14 flags: 'a',
15 encoding: 'utf-8',
16 highWaterMark: 64 * 1024 // 64 KB, you can adjust this value as needed
17
18 });
19 } else {
20 this.writeStream = fs.createWriteStream(filePath, {
21 encoding: 'utf-8',
22 highWaterMark: 64 * 1024 // 64 KB, you can adjust this value as needed
23 });
24 }
25 }
26
27 async push(data: any): Promise<void> {
28 return this.performWrite(JSON.stringify(data) + '\n');

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected