MCPcopy
hub / github.com/rsms/node-imagemagick / limitedWrite

Function limitedWrite

imagemagick.js:46–54  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

44 this.callback = cb;
45
46 var limitedWrite = function(stream) {
47 return function(chunk) {
48 stream.contents += chunk;
49 if (!killed && stream.contents.length > options.maxBuffer) {
50 child.kill(options.killSignal);
51 killed = true;
52 }
53 };
54 };
55 this.out = limitedWrite(this.stdout);
56 this.err = limitedWrite(this.stderr);
57 };

Callers 1

AccumulatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected