function $6121c6d98731f1f3$var$format(extensions) {
    return Object.keys(extensions).map((extension)=>{
        let configurations = extensions[extension];
        if (!Array.isArray(configurations)) configurations = [
            configurations
        ];
        return configurations.map((params)=>{
            return [
                extension
            ].concat(Object.keys(params).map((k)=>{
                let values = params[k];
                if (!Array.isArray(values)) values = [
                    values
                ];
                return values.map((v)=>v === true ? k : `${k}=${v}`
                ).join('; ');
            })).join('; ');
        }).join(', ');
    }).join(', ');
}
/**
 * Builds the `Sec-WebSocket-Extensions` header field value.
 *
 * @param {Object} extensions The map of extensions and parameters to format
 * @return {String} A string representing the given object
 * @public
 */
Builds the `Sec-WebSocket-Extensions` header field value.
@param {Object} extensions The map of extensions and parameters to format
@return {String} A string representing the given object
@public
Builds the ` Sec - WebSocket - Extensions ` header field value . @param { Object } extensions The map of extensions and parameters to format @return { String } A string representing the given object @public
function $6121c6d98731f1f3$var$format(extensions) {
    return Object.keys(extensions).map((extension)=>{
        let configurations = extensions[extension];
        if (!Array.isArray(configurations)) configurations = [
            configurations
        ];
        return configurations.map((params)=>{
            return [
                extension
            ].concat(Object.keys(params).map((k)=>{
                let values = params[k];
                if (!Array.isArray(values)) values = [
                    values
                ];
                return values.map((v)=>v === true ? k : `${k}=${v}`
                ).join('; ');
            })).join('; ');
        }).join(', ');
    }).join(', ');
}
function $6121c6d98731f1f3$var$format ( extensions ) { return Object . keys ( extensions ) . map ( ( extension ) => { let configurations = extensions [ extension ] ; if ( ! Array . isArray ( configurations ) ) configurations = [ configurations ] ; return configurations . map ( ( params ) => { return [ extension ] . concat ( Object . keys ( params ) . map ( ( k ) => { let values = params [ k ] ; if ( ! Array . isArray ( values ) ) values = [ values ] ; return values . map ( ( v ) => v === true ? k : ` ${ k } ${ v } ` ) . join ( '; ' ) ; } ) ) . join ( '; ' ) ; } ) . join ( ', ' ) ; } ) . join ( ', ' ) ; }
Builds the `Sec-WebSocket-Extensions` header field value.
Builds the ` Sec - WebSocket - Extensions ` header field value .