static encode(s, encoding) {
        const encodingName = this.encodingName(encoding);
        if (this.customEncoder) {
            return this.customEncoder(s, encodingName);
        }
        // Increases browser support.
        if (typeof TextEncoder === 'undefined') {
            return this.encodeFallback(s);
        }
        // TextEncoder only encodes to UTF8 by default as specified by encoding.spec.whatwg.org
        return new TextEncoder().encode(s);
    }
/**
     * Encodes some string into a Uint8Array.
     */
Encodes some string into a Uint8Array.
Encodes some string into a Uint8Array .
static encode(s, encoding) {
        const encodingName = this.encodingName(encoding);
        if (this.customEncoder) {
            return this.customEncoder(s, encodingName);
        }
        if (typeof TextEncoder === 'undefined') {
            return this.encodeFallback(s);
        }
        return new TextEncoder().encode(s);
    }
static encode ( s , encoding ) { const encodingName = this . encodingName ( encoding ) ; if ( this . customEncoder ) { return this . customEncoder ( s , encodingName ) ; } if ( typeof TextEncoder === 'undefined' ) { return this . encodeFallback ( s ) ; } return new TextEncoder ( ) . encode ( s ) ; }
Encodes some string into a Uint8Array.
Encodes some string into a Uint8Array .
// Increases browser support. // TextEncoder only encodes to UTF8 by default as specified by encoding.spec.whatwg.org