Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

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();
  }
}

[zur Elbe Produktseite wechseln0.60Quellennavigators]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=141584
#Domains=752002