function $0f6132794ad18091$var$populateMaps(extensions, types) {
    // source preference (least -> most)
    var preference = [
        'nginx',
        'apache',
        undefined,
        'iana'
    ];
    Object.keys($b7a87b4cc72006dc$exports).forEach(function forEachMimeType(type) {
        var mime = $b7a87b4cc72006dc$exports[type];
        var exts = mime.extensions;
        if (!exts || !exts.length) return;
        // mime -> extensions
        extensions[type] = exts;
        // extension -> mime
        for(var i = 0; i < exts.length; i++){
            var extension = exts[i];
            if (types[extension]) {
                var from = preference.indexOf($b7a87b4cc72006dc$exports[types[extension]].source);
                var to = preference.indexOf(mime.source);
                if (types[extension] !== 'application/octet-stream' && (from > to || from === to && types[extension].substr(0, 12) === 'application/')) continue;
            }
            // set the extension -> mime
            types[extension] = type;
        }
    });
}
/**
 * Populate the extensions and types maps.
 * @private
 */
Populate the extensions and types maps.
@private
Populate the extensions and types maps . @private
function $0f6132794ad18091$var$populateMaps(extensions, types) {
    var preference = [
        'nginx',
        'apache',
        undefined,
        'iana'
    ];
    Object.keys($b7a87b4cc72006dc$exports).forEach(function forEachMimeType(type) {
        var mime = $b7a87b4cc72006dc$exports[type];
        var exts = mime.extensions;
        if (!exts || !exts.length) return;
        extensions[type] = exts;
        for(var i = 0; i < exts.length; i++){
            var extension = exts[i];
            if (types[extension]) {
                var from = preference.indexOf($b7a87b4cc72006dc$exports[types[extension]].source);
                var to = preference.indexOf(mime.source);
                if (types[extension] !== 'application/octet-stream' && (from > to || from === to && types[extension].substr(0, 12) === 'application/')) continue;
            }
            types[extension] = type;
        }
    });
}
function $0f6132794ad18091$var$populateMaps ( extensions , types ) { var preference = [ 'nginx' , 'apache' , undefined , 'iana' ] ; Object . keys ( $b7a87b4cc72006dc$exports ) . forEach ( function forEachMimeType ( type ) { var mime = $b7a87b4cc72006dc$exports [ type ] ; var exts = mime . extensions ; if ( ! exts || ! exts . length ) return ; extensions [ type ] = exts ; for ( var i = 0 ; i < exts . length ; i ++ ) { var extension = exts [ i ] ; if ( types [ extension ] ) { var from = preference . indexOf ( $b7a87b4cc72006dc$exports [ types [ extension ] ] . source ) ; var to = preference . indexOf ( mime . source ) ; if ( types [ extension ] !== 'application/octet-stream' && ( from > to || from === to && types [ extension ] . substr ( 0 , 12 ) === 'application/' ) ) continue ; } types [ extension ] = type ; } } ) ; }
Populate the extensions and types maps.
Populate the extensions and types maps .
// source preference (least -> most) // mime -> extensions // extension -> mime // set the extension -> mime