app/assets/javascripts/lib/dominoes-1.0-rc2.js
File dominoes-1.0-rc2.js
has 549 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Dominoes v.1.0 (rc2) [2/3/10 01:04:06.934 - CET]
* Copyright 2010, Julian Aubourg
* Dual licensed under the MIT and GPL Version 2 licenses
*/
Function execute
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function execute( item , context , thread , callback ) {
var url,
length;
Function functor
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
functor = dominoes.functor = dataHolder( function( _id , func ) {
var parts = /^([^$()]+)(?:\(([|SOF+]*)\))?$/.exec( _id );
if ( parts ) {
Function parseChain
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseChain( chain ) {
chain = chain.split( R_DELIM );
var i = 0,
Function parseStringItem
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseStringItem( string , context , thread ) {
var done,
func,
data = {},
Function loader
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loader( loadFunction ) {
var loaded = {},
loading = {};
Function id
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
functor = functors[ id ] = functors[ id ] || function( _data , thread ) {
var data = _data,
context = this;
Function rule
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var rule = dominoes.rule = dataHolder( function( id ) {
var rules = this,
running = FALSE,
callbacks = [],
Avoid deeply nested control flow statements. Open
Open
if ( item[ STR_CALL ]( context , callback , thread ) !== FALSE ) {
callback();
}
Avoid deeply nested control flow statements. Open
Open
if ( isString( item ) ) {
item = {
url: url
};
Avoid deeply nested control flow statements. Open
Open
} else if ( isArray( item ) && ( length = item[ STR_LENGTH ] ) ) {
if ( item.P ) {
var i = 0,
Avoid deeply nested control flow statements. Open
Open
if ( ! --cssPollingNb ) {
return FALSE;
}
Avoid deeply nested control flow statements. Open
Open
if ( item === SYM_WAIT || item === SYM_READY ) {
if ( item === SYM_READY ) {
current[ STR_PUSH ]( ready );
}
Avoid deeply nested control flow statements. Open
Open
if ( subFunctors[ STR_PLUS ] && isString( data ) ) {
if ( subFunctors[ STR_PLUS ] !== plus ) {
plus = subFunctors[ STR_PLUS ];
accu = accumulator( plus );
Consider simplifying this complex logical expression. Open
Open
if ( ! window[ STR_DOMINOES ] )
(function(
STR_ASYNC,
STR_CACHE,