src/utils/Async.js
File Async.js
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Function waitForAll
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function waitForAll(promises, failOnReject, timeout) {
var masterDeferred = new $.Deferred(),
results = [],
count = 0,
sawRejects = false;
Function doInParallel
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doInParallel(items, beginProcessItem, failFast) {
var promises = [];
var masterDeferred = new $.Deferred();
if (items.length === 0) {
Function chain
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function chain(functions, args) {
var deferred = $.Deferred();
function chainHelper(index, args) {
if (functions.length === index) {
Function doSequentially
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function doSequentially(items, beginProcessItem, failAndStopFast) {
var masterDeferred = new $.Deferred(),
hasFailed = false;