lib/abaaso.js
function () {
		var i     = 0,
		    defer = deferred(),
		    args  = array.cast( arguments ),
		    nth;

		// Did we receive an Array? if so it overrides any other arguments
		if ( args[0] instanceof Array ) {
			args = args[0];
		}

		// How many instances to observe?
		nth = args.length;

		// None, end on next tick
		if ( nth === 0 ) {
			defer.resolve( null );
		}
		// Setup and wait
		else {
			array.each( args, function ( p ) {
				p.then( function () {
					if ( ++i === nth && !defer.isResolved()) {
						if ( args.length > 1 ) {
							defer.resolve( args.map( function ( obj ) {
								return obj.value || obj.promise.value;
							}));
						}
						else {
							defer.resolve( args[0].value || args[0].promise.value );
						}
					}
				}, function () {
					if ( !defer.isResolved() ) {
						if ( args.length > 1 ) {
							defer.reject( args.map( function ( obj ) {
								return obj.value || obj.promise.value;
							}));
						}
						else {
							defer.reject( args[0].value || args[0].promise.value );
						}
					}
				});
			});
		}

		return defer;
	}
function () {
		var i     = 0,
		    defer = deferred(),
		    args  = array.cast( arguments ),
		    nth;

		// Did we receive an Array? if so it overrides any other arguments
		if ( args[0] instanceof Array ) {
			args = args[0];
		}

		// How many instances to observe?
		nth = args.length;

		// None, end on next tick
		if ( nth === 0 ) {
			defer.resolve( null );
		}
		// Setup and wait
		else {
			array.each( args, function ( p ) {
				p.then( function () {
					if ( ++i === nth && !defer.isResolved()) {
						if ( args.length > 1 ) {
							defer.resolve( args.map( function ( obj ) {
								return obj.value || obj.promise.value;
							}));
						}
						else {
							defer.resolve( args[0].value || args[0].promise.value );
						}
					}
				}, function () {
					if ( !defer.isResolved() ) {
						if ( args.length > 1 ) {
							defer.reject( args.map( function ( obj ) {
								return obj.value || obj.promise.value;
							}));
						}
						else {
							defer.reject( args[0].value || args[0].promise.value );
						}
					}
				});
			});
		}

		return defer;
	}
function ( ) { var i = 0 , defer = deferred ( ) , args = array . cast ( arguments ) , nth ; // Did we receive an Array? if so it overrides any other arguments if ( args [ 0 ] instanceof Array ) { args = args [ 0 ] ; } // How many instances to observe? nth = args . length ; // None, end on next tick if ( nth === 0 ) { defer . resolve ( null ) ; } // Setup and wait else { array . each ( args , function ( p ) { p . then ( function ( ) { if ( ++ i === nth && ! defer . isResolved ( ) ) { if ( args . length > 1 ) { defer . resolve ( args . map ( function ( obj ) { return obj . value || obj . promise . value ; } ) ) ; } else { defer . resolve ( args [ 0 ] . value || args [ 0 ] . promise . value ) ; } } } , function ( ) { if ( ! defer . isResolved ( ) ) { if ( args . length > 1 ) { defer . reject ( args . map ( function ( obj ) { return obj . value || obj . promise . value ; } ) ) ; } else { defer . reject ( args [ 0 ] . value || args [ 0 ] . promise . value ) ; } } } ) ; } ) ; } return defer ; }
Accepts Deferreds or Promises as arguments or an Array

@method when
@return {Object} Deferred
Accepts Deferreds or Promises as arguments or an Array