Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/stream-slice/ drwxr-xr-x | |
| Viewing file: Select action/file-type:
var util = require('util');
var Transform = require('stream').Transform;
util.inherits(SliceStream, Transform);
function SliceStream(start, end) {
if (!(this instanceof SliceStream)) {
return new SliceStream();
}
Transform.call(this);
this._start = start || 0;
this._end = end || Infinity;
this._offset = 0;
this._state = 0;
this._emitUp = false;
this._emitDown = false;
}
SliceStream.prototype._transform = function(chunk, encoding, done) {
this._offset += chunk.length;
if (!this._emitUp && this._offset >= this._start) {
this._emitUp = true;
var start = chunk.length - (this._offset - this._start);
if(this._offset > this._end)
{
var end = chunk.length - (this._offset - this._end);
this._emitDown = true;
this.push(chunk.slice(start, end));
}
else
{
this.push(chunk.slice(start, chunk.length));
}
return done();
}
if (this._emitUp && !this._emitDown) {
if (this._offset >= this._end) {
this._emitDown = true;
this.push(chunk.slice(0, chunk.length - (this._offset - this._end)));
} else {
this.push(chunk);
}
return done();
}
return done();
}
exports.slice = function(start, end) {
return new SliceStream(start, end);
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0054 ]-- |