web-wiki/resources/mediawiki/mediawiki.js
/**
			 * Gets a list of module names that a module depends on in their proper dependency order
			 *
			 * @param module string module name or array of string module names
			 * @return list of dependencies, including 'module'.
			 * @throws Error if circular reference is detected
			 */
Gets a list of module names that a module depends on in their proper dependency order

@param module string module name or array of string module names
@return list of dependencies, including 'module'.
@throws Error if circular reference is detected
Gets a list of module names that a module depends on in their proper dependency order @param module string module name or array of string module names @return list of dependencies including ' module ' . @throws Error if circular reference is detected
function resolve( module ) {
				var modules, m, deps, n, resolved;
				if ( $.isArray( module ) ) {
					modules = [];
					for ( m = 0; m < module.length; m += 1 ) {
						deps = resolve( module[m] );
						for ( n = 0; n < deps.length; n += 1 ) {
							modules[modules.length] = deps[n];
						}
					}
					return modules;
				} else if ( typeof module === 'string' ) {
					resolved = [];
					recurse( module, resolved, [] );
					return resolved;
				}
				throw new Error( 'Invalid module argument: ' + module );
			}
function resolve ( module ) { var modules , m , deps , n , resolved ; if ( $ . isArray ( module ) ) { modules = [ ] ; for ( m = 0 ; m < module . length ; m += 1 ) { deps = resolve ( module [ m ] ) ; for ( n = 0 ; n < deps . length ; n += 1 ) { modules [ modules . length ] = deps [ n ] ; } } return modules ; } else if ( typeof module === 'string' ) { resolved = [ ] ; recurse ( module , resolved , [ ] ) ; return resolved ; } throw new Error ( 'Invalid module argument: ' + module ) ; }
Gets a list of module names that a module depends on in their proper dependency order
Gets a list of module names that a module depends on in their proper dependency order
// Allow calling with an array of module names
