src/log_analyzer/js/mime-types.js
File mime-types.js
has 970 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
Copyright (c) 2013 Gildas Lormeau. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Avoid deeply nested control flow statements. Open
Open
if (typeof val == "string") {
mimeTypes[val] = type + "/" + subtype;
} else {
for (index = 0; index < val.length; index++) {
mimeTypes[val[index]] = type + "/" + subtype;