igir
Version:
🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
24 lines (23 loc) • 538 B
JavaScript
import stream from "node:stream";
class ProgressTransform extends stream.Transform {
progressCallback;
progress = 0;
constructor(progressCallback) {
super();
this.progressCallback = progressCallback;
}
/**
* Process the stream.
*/
_transform(chunk, _encoding, callback) {
this.progress += chunk.length;
if (this.progressCallback) {
this.progressCallback(this.progress);
}
callback(null, chunk);
}
}
export {
ProgressTransform as default
};
//# sourceMappingURL=progressTransform.js.map