format: prettify entire project

This commit is contained in:
Rim
2025-04-02 06:50:39 -04:00
parent 86f0782a98
commit 7ccc0be712
1711 changed files with 755867 additions and 235931 deletions

30
node_modules/stream-meter/index.js generated vendored
View File

@ -1,27 +1,29 @@
module.exports = Meter
module.exports = Meter;
var util = require("util")
var util = require('util');
var Transform = require("stream").Transform
var Transform = require('stream').Transform;
if (!Transform) {
Transform = require("readable-stream/transform")
Transform = require('readable-stream/transform');
}
function Meter(maxBytes) {
if (!(this instanceof Meter)) return new Meter(maxBytes)
Transform.call(this)
if (!(this instanceof Meter)) return new Meter(maxBytes);
Transform.call(this);
this.bytes = 0
this.maxBytes = maxBytes || Number.MAX_VALUE
this.bytes = 0;
this.maxBytes = maxBytes || Number.MAX_VALUE;
}
util.inherits(Meter, Transform)
util.inherits(Meter, Transform);
Meter.prototype._transform = function (chunk, encoding, cb) {
this.bytes += chunk.length
this.push(chunk)
this.bytes += chunk.length;
this.push(chunk);
if (this.bytes > this.maxBytes) {
return cb(new Error("Stream exceeded specified max of " + this.maxBytes + " bytes."))
return cb(
new Error('Stream exceeded specified max of ' + this.maxBytes + ' bytes.')
);
}
cb()
}
cb();
};