lost+found/src/mimetype.js
function _gpfBuildMimeTypeFromMappings (path, mappings) {
    _gpfObjectForEach(mappings, function (extensions, key) {
        var mimeType = path + key;
        if (0 === extensions) {
            _createMimeTypeExtensionMapping(mimeType, "." + key);

        } else if ("string" === typeof extensions) {
            extensions.split(",").forEach(function (extension) {
                _createMimeTypeExtensionMapping(mimeType, "." + extension);
            });

        } else { // Assuming extensions is an object
            _gpfBuildMimeTypeFromMappings(mimeType + "/", extensions);
        }
    });
}
function _gpfBuildMimeTypeFromMappings (path, mappings) {
    _gpfObjectForEach(mappings, function (extensions, key) {
        var mimeType = path + key;
        if (0 === extensions) {
            _createMimeTypeExtensionMapping(mimeType, "." + key);

        } else if ("string" === typeof extensions) {
            extensions.split(",").forEach(function (extension) {
                _createMimeTypeExtensionMapping(mimeType, "." + extension);
            });

        } else { // Assuming extensions is an object
            _gpfBuildMimeTypeFromMappings(mimeType + "/", extensions);
        }
    });
}
function _gpfBuildMimeTypeFromMappings ( path , mappings ) { _gpfObjectForEach ( mappings , function ( extensions , key ) { var mimeType = path + key ; if ( 0 === extensions ) { _createMimeTypeExtensionMapping ( mimeType , "." + key ) ; } else if ( "string" === typeof extensions ) { extensions . split ( "," ) . forEach ( function ( extension ) { _createMimeTypeExtensionMapping ( mimeType , "." + extension ) ; } ) ; } else { // Assuming extensions is an object _gpfBuildMimeTypeFromMappings ( mimeType + "/" , extensions ) ; } } ) ; }
Recursive function that fills _gpfMimeTypesToExtension & _gpfMimeTypesFromExtension

@param {String} path
@param {Object} mappings
@private
Recursive function that fills _gpfMimeTypesToExtension & _gpfMimeTypesFromExtension