visualcaptcha.jquery.src.js
File visualcaptcha.jquery.src.js
has 820 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! visualCaptcha - v0.0.8 - 2016-01-23
* http://visualcaptcha.net
* Copyright (c) 2016 emotionLoop; Licensed MIT */
(function( root, factory ) {
Function normalize
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalize(name, baseName) {
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
foundI, foundStarMap, starI, i, j, part,
baseParts = baseName && baseName.split("/"),
map = config.map,
Function visualCaptcha
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.visualCaptcha = function( options ) {
var config;
config = $.extend( {
imgPath: '/',
Avoid deeply nested control flow statements. Open
Open
if (i === 1 && (name[2] === '..' || name[0] === '..')) {
//End of the line. Keep at least one non-dot
//path segment at the front so it can be mapped
//correctly to disk. Otherwise, there is likely
//no path mapping for a path starting with '..'.
Avoid deeply nested control flow statements. Open
Open
if (mapValue) {
mapValue = mapValue[nameSegment];
if (mapValue) {
//Match, update name to the new value.
foundMap = mapValue;