MCPcopy Create free account
hub / github.com/vercel/vercel / transform

Function transform

packages/client/src/upload.ts:213–217  ·  view source on GitHub ↗
(chunk, _encoding, callback)

Source from the content-addressed store, hash-verified

211 const fileStream = createReadStream(names[0]);
212 const counter = new Transform({
213 transform(chunk, _encoding, callback) {
214 uploadProgress.bytesUploaded += chunk.length;
215 uploadProgress.emit('progress');
216 callback(null, chunk);
217 },
218 });
219 fileStream.on('error', err => counter.destroy(err));
220 counter.on('close', () => fileStream.destroy());

Callers 2

readFileFunction · 0.50
runNftFunction · 0.50

Calls 2

callbackFunction · 0.85
emitMethod · 0.80

Tested by

no test coverage detected