403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.47
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Program Files/nodejs/node_modules/npm/node_modules/minipass-sized/dist/esm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Program Files/nodejs/node_modules/npm/node_modules/minipass-sized/dist/esm/index.js
import { Minipass } from 'minipass';
const isBufferEncoding = (enc) => typeof enc === 'string';
export class SizeError extends Error {
    expect;
    found;
    code = 'EBADSIZE';
    constructor(found, expect, from) {
        super(`Bad data size: expected ${expect} bytes, but got ${found}`);
        this.expect = expect;
        this.found = found;
        Error.captureStackTrace(this, from ?? this.constructor);
    }
    get name() {
        return 'SizeError';
    }
}
export class MinipassSized extends Minipass {
    found = 0;
    expect;
    constructor(options) {
        const size = options?.size;
        if (typeof size !== 'number' ||
            size > Number.MAX_SAFE_INTEGER ||
            isNaN(size) ||
            size < 0 ||
            !isFinite(size) ||
            size !== Math.floor(size)) {
            throw new Error('invalid expected size: ' + size);
        }
        //@ts-ignore
        super(options);
        if (options.objectMode) {
            throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);
        }
        this.expect = size;
    }
    write(chunk, encoding, cb) {
        const buffer = Buffer.isBuffer(chunk) ? chunk
            : typeof chunk === 'string' ?
                Buffer.from(chunk, isBufferEncoding(encoding) ? encoding : 'utf8')
                : chunk;
        if (typeof encoding === 'function') {
            cb = encoding;
            encoding = null;
        }
        if (!Buffer.isBuffer(buffer)) {
            this.emit('error', new TypeError(`${this.constructor.name} streams only work with string and buffer data`));
            return false;
        }
        this.found += buffer.length;
        if (this.found > this.expect)
            this.emit('error', new SizeError(this.found, this.expect));
        return super.write(chunk, encoding, cb);
    }
    emit(ev, ...args) {
        if (ev === 'end') {
            if (this.found !== this.expect) {
                this.emit('error', new SizeError(this.found, this.expect, this.emit));
            }
        }
        return super.emit(ev, ...args);
    }
}
//# sourceMappingURL=index.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit