Showing 290 of 632 total issues
Function dump
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
angular.mock.dump = function(object) {
return serialize(object);
function serialize(object) {
var out;
Function select
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function select( selector, context, results, seed ) {
var i, tokens, token, type, find,
match = tokenize( selector );
if ( !seed ) {
Function matcherFromTokens
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Function slide
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Function setUrlParams
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setUrlParams: function(config, params, actionUrl) {
var self = this,
url = actionUrl || self.template,
val,
encodedVal;
Function attr
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.attr = function( elem, name, value, pass ) {
var lowerName = name.toLowerCase(),
nType = elem && elem.nodeType;
if ( pass ) {
Function htmlSanitizeWriter
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function htmlSanitizeWriter(buf, uriValidator){
var ignore = false;
var out = angular.bind(buf, buf.push);
return {
start: function(tag, attrs, unary){
Function getPages
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
paginationCtrl.getPages = function(currentPage, totalPages) {
var pages = [];
// Default page limits
var startPage = 1, endPage = totalPages;
Function getPages
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
paginationCtrl.getPages = function(currentPage, totalPages) {
var pages = [];
// Default page limits
var startPage = 1, endPage = totalPages;
Function createNew
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createNew: function () {
var stack = [];
return {
add: function (key, value) {
Function createNew
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createNew: function () {
var stack = [];
return {
add: function (key, value) {
Consider simplifying this complex logical expression. Open
Open
"pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n != 1 && (n % 10 == 0 || n % 10 == 1) || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 12 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
Consider simplifying this complex logical expression. Open
Open
"pluralCat": function (n) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == (n | 0) && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n != 1 && (n % 10 == 0 || n % 10 == 1) || n == (n | 0) && n % 10 >= 5 && n % 10 <= 9 || n == (n | 0) && n % 100 >= 12 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
Function autocomplete
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'autocomplete': function (text) {
return es.search({
index: 'musicalbum',
type: 'album',
body: {
Function select
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.select = function(nextSlide, direction) {
var nextIndex = slides.indexOf(nextSlide);
//Decide direction if it's not given
if (direction === undefined) {
direction = nextIndex > currentIndex ? "next" : "prev";
Function select
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.select = function(nextSlide, direction) {
var nextIndex = slides.indexOf(nextSlide);
//Decide direction if it's not given
if (direction === undefined) {
direction = nextIndex > currentIndex ? "next" : "prev";
Function stop
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Function val
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {