function(modules) {
		// expects that we've been given storage of all our available
		// modules, and their binary info.
		if (!this._moduleStorage) {
			return null;
		}

		if (!modules || (modules.length <= 0)) {
			return null;
		}

		var results = [];

		// expecting something like...
		// { f: "s", n: "2", v: 2 }


		//iterate over our requirements
		for (var i = 0; i < modules.length; i++) {
			var m = modules[i];


			//iterate over what's available
			for (var a = 0; a < this._moduleStorage.length; a++) {
				var module = this._moduleStorage[a];
				var avail = module.describe;	//grab the converted bits

				var isMatch = ((avail.n === m.n)
					&& (avail.f === m.f)
					&& (avail.v >= m.v));

				//console.log('comparing ', m, avail);

				if (isMatch) {
					results.push(module);
					break;
				}
			}
		}
		return when.resolve(results);
	}
function(modules) {
		
		
		if (!this._moduleStorage) {
			return null;
		}

		if (!modules || (modules.length <= 0)) {
			return null;
		}

		var results = [];

		
		


		
		for (var i = 0; i < modules.length; i++) {
			var m = modules[i];


			
			for (var a = 0; a < this._moduleStorage.length; a++) {
				var module = this._moduleStorage[a];
				var avail = module.describe;	

				var isMatch = ((avail.n === m.n)
					&& (avail.f === m.f)
					&& (avail.v >= m.v));

				

				if (isMatch) {
					results.push(module);
					break;
				}
			}
		}
		return when.resolve(results);
	}
function ( modules ) { // expects that we've been given storage of all our available // modules, and their binary info. if ( ! this . _moduleStorage ) { return null ; } if ( ! modules || ( modules . length <= 0 ) ) { return null ; } var results = [ ] ; // expecting something like... // { f: "s", n: "2", v: 2 } //iterate over our requirements for ( var i = 0 ; i < modules . length ; i ++ ) { var m = modules [ i ] ; //iterate over what's available for ( var a = 0 ; a < this . _moduleStorage . length ; a ++ ) { var module = this . _moduleStorage [ a ] ; var avail = module . describe ; //grab the converted bits var isMatch = ( ( avail . n === m . n ) && ( avail . f === m . f ) && ( avail . v >= m . v ) ) ; //console.log('comparing ', m, avail); if ( isMatch ) { results . push ( module ) ; break ; } } } return when . resolve ( results ) ; }
/*
expects the array of module descriptions back from the solve routine
and returns amodule description result complete with fileBuffer
@param Array modules
@returns Object
/ * expects the array of module descriptions back from the solve routine and returns amodule description result complete with fileBuffer