---------------------------------- for modules
197968
function (fn) {
            var requires = [];
            // Remove comments from the callback string,
            // look for require calls, and pull them into the dependencies,
            // but only if there are function args.
            fn.toString()
                .replace(commentRegExp, '')
                .replace(requireRegExp, function (match, _, dep) {
                    requires.push(dep);
                });
            return requires;
        }
568560
def module_methods_in(klass)
      klass.included_modules.each_with_object([]) do |mod, accumulator|
        if mod.to_s =~ /#{klass}/
          mod.instance_methods(false).each do |method|
            accumulator << method
          end
        end
        accumulator
      end
    end
648524
function(module) {
		var name = module.$modname;
		if (!this.$hasModule(name)) {
			this._modules.push(module);
			if (gui.Type.isFunction(module.oncontextinitialize)) {
				module.oncontextinitialize(window);
			}
			if (gui.Type.isFunction(module.onrun)) {
				module.onrun();
			}
		} else {
			throw new Error(name + ' loaded twice?');
		}
		return module;
	}
178376
function Module(options) {
    var module = this;
    options = options || {};

    /**
     * Whether the module is initialized.
     * @property {Boolean} [initialized=false]
     */
    module.initialized = false;
    /**
     * Whether the module is running.
     * @property {Boolean} [running=false]
     */
    module.running = false;

    ['init', 'start', 'stop', 'exit'].forEach(function(name) {
        var method = options[name];
        if (method) {
            var setMethod = 'set' + name[0].toUpperCase() + name.slice(1) + 'Method';
            module[setMethod](method);
        }
    });
}
269452
function nodeModules() {
  return fs.readdirSync('node_modules')
           .filter(dir => ['.bin'].indexOf(dir) === -1)
           .reduce((modules, m) => {
             modules[m] = 'commonjs2 ' + m
             return modules
           }, {})
}
892036
function resolveModule(module) {
  debug("resolveModule", module);

  const presetName = module;

  if (path.isAbsolute(presetName)) {
    return [getPresetName(module), module];
  }

  try {
    // Try the naive way
    return [presetName, require.resolve(module)];
  } catch (e) {
    // Try a more advanced way
    return [presetName, resolve.sync(process.cwd() + "/node_modules", module)];
  }
}
252719
private void addModuleToTree(final DbModule module, final TreeNode tree) {
        final TreeNode subTree = new TreeNode();
        subTree.setName(module.getName());
        tree.addChild(subTree);

        // Add SubsubModules
        for (final DbModule subsubmodule : module.getSubmodules()) {
            addModuleToTree(subsubmodule, subTree);
        }
    }
1076433
function(consoleService, moduleId, msg, cb) {
	let modules = consoleService.modules;

	let result = [];
	for (let moduleId in modules) {
		if (/^__\w+__$/.test(moduleId)) {
			continue;
		}

		result.push(moduleId);
	}

	cb(null, {
		modules: result
	});
}
35540
def modules(self, value):
        """"""

        modules = [module.__name__ for module in self.loadmodules(value)]

        self._modules = [
            module for module in self._modules + modules
            if module not in self._modules
        ]
537490
public static function initModules() {
        $cfg = ServiceContainer::get('config');
        $moduleList = $cfg->getConfigData('modules');
        if (count($moduleList) > 0) {
            foreach ($moduleList as $moduleName) {
                self::loadModule($moduleName);
            }
        }
    }
58139
function(moduleId) {
		var visitedModules = {};
		var recurse = function(moduleId) {
			if (visitedModules[moduleId] == true) { return true; }
			visitedModules[moduleId] = true;
			var module = getModule(moduleId);
			if (!module || !module.defined) { return false; }
			else {
				var deps = module.deps || [];
				for (var i = deps.length; i--;) {
					if (!recurse(deps[i])) {
						return false;
					}
				}
				return true;
			}
		};
		return recurse(moduleId);
	}
1263667
function modules() {
  // Bootstrap
  var bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*')
    .pipe(gulp.dest('./vendor/bootstrap'));
  // jQuery
  var jquery = gulp.src([
      './node_modules/jquery/dist/*',
      '!./node_modules/jquery/dist/core.js'
    ])
    .pipe(gulp.dest('./vendor/jquery'));
  return merge(bootstrap, jquery);
}
739410
function intersectModules(modulesA, modulesB) {
    const intersection = [];
    for (const module of modulesA) {
      if (modulesB.includes(module)) {
        intersection.push(module);
      }
    }
    return intersection;
  }
679005
public Governator addModules(Module ... modules) {
        if (modules != null) {
            this.modules.addAll(Arrays.asList(modules));
        }
        return this;
    }
851241
function runModules(str, modules) {
    var replacements = [],
        module;

    if (Array.isArray(modules) === false) {
        modules = [modules];
    }

    modules.forEach(function forEachModule(module) {
        if (!module) {
            throw new Error("Unknown module '" + module + "'");
        }

        runModule(module, str, replacements);
    });

    return replacements;
}
1374990
public function enableModules($modules)
    {
        foreach ($modules as $moduleToEnable => $value) {
            $module = $this->module->get($moduleToEnable);
            $module->enable();
        }
    }
391409
static void registerAdditionalModules(
            final ObjectMapper objectMapper,
            final Function<String, String> propertyAccessor) {
        final String moduleClassNames = propertyAccessor.apply("commons.object-mapper-additional-module-class-names");
        if (moduleClassNames != null) {
            for (final String moduleClassName : moduleClassNames.split(",")) {
                registerModule(objectMapper, moduleClassName);
            }
        }
    }