Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/remote/shared/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  NetworkDataBytes.sys.mjs   Sprache: unbekannt

 
Untersuchungsergebnis.mjs Download desUnknown {[0] [0] [0]}

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

export class NetworkDataBytes {
  #getBytesValue;
  #isBase64;

  /**
   * Common interface used to handle network BytesValue for collected data which
   * might be encoded and require an additional async step in order to retrieve
   * the actual bytes.
   *
   * This is a simple wrapper mostly designed to ensure a common interface in
   * case this is used for request or response bodies.
   *
   * @param {object} options
   * @param {Function} options.getBytesValue
   *     A -potentially async- callable which returns the bytes as a string.
   * @param {boolean} options.isBase64
   *     Whether this represents a base64-encoded binary data.
   */
  constructor(options) {
    this.#getBytesValue = options.getBytesValue;
    this.#isBase64 = options.isBase64;
  }

  get isBase64() {
    return this.#isBase64;
  }

  async getBytesValue() {
    return this.#getBytesValue();
  }
}

[Dauer der Verarbeitung: 0.25 Sekunden, vorverarbeitet 2026-08-25]