iframely/lib/whitelist.js
Function findWhitelistRecordFor
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
whitelist.findWhitelistRecordFor = function(uri, options) {
if (!whitelistObject) {
return null;
}
File whitelist.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(whitelist) {
var chokidar = require('chokidar'),
fs = require('fs'),
path = require('path'),
Function extractDomainPatterns
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function extractDomainPatterns(uri, disableWildcard) {
var patterns = [];
var domain = extractDomain(uri);
Avoid deeply nested control flow statements. Open
Open
if (rel !== options.exclusiveRel) {
// Remove all rels except exclusiveRel.
delete record[rel];
}
Avoid deeply nested control flow statements. Open
Open
for(var type in protocol) {
if (!(type in recordProtocol)) {
recordProtocol[type] = protocol[type];
}
}
Avoid deeply nested control flow statements. Open
Open
if (!recordProtocol) {
recordProtocol = record[protocolId] = {};
} else {
recordProtocol = _.extend({}, recordProtocol);
}