Module containing Clan functions
@module Clan
547559
function Clan(config) {

    //Read the clans data from a csv to an array object
    var readClan = function(data) {
        var members = [],
            space = new RegExp(String.fromCharCode(65533), 'g');

        for (var i = 1; i < data.length; i++) {
            var member = data[i];
            members.push({
                player: member[0].replace(space, ' '),
                rank: member[1],
                exp: Number(member[2]),
                kills: Number(member[3])
            });
        }

        return members;
    };

    /**
     * Get a clans member list with exp gained and total kills (available for `rs`)
     * @param  name The clans name
     * @returns {Object} Member list
     * @example
     * api.rs.hiscores.clan('Efficiency Experts').then(function(clan) {
     *   console.log(clan);
     * }).catch(console.error);
     */
    this.members = function(name) {
        return new Promise(function(resolve, reject) {
            if (typeof config.urls.members === 'undefined') {
                reject(new Error('Oldschool RuneScape does not have clans.'));
                return;
            }

            request.csv(config.urls.members + encodeURIComponent(name)).then(function(data) {
                resolve(readClan(data));
            }).catch(reject);
        });
    };
}
171602
function(moduleName, deps, callback) {
  //if (moduleName === "jquery/selector") { debugger; }
  if (!deps && !callback) {
    return;
  }

  // Allow deps to be optional.
  if (!callback && typeof deps === "function") {
    callback = deps;
    deps = undefined;
  }

  // Ensure dependencies is never falsey.
  deps = deps || [];

  // Normalize the dependencies.
  deps = deps.map(function(dep) {
    if (dep.indexOf("./") === -1) {
      return dep;
    }

    // Take off the last path.
    var normalize = moduleName.split("/").slice(0, -1).join("/");

    //console.log(normalize, dep, define.join(normalize, dep));
    return define.join(normalize, dep);
  });

  // Attach to the module map.
  define.map[moduleName] = {
    moduleName: moduleName,
    deps: deps,
    callback: callback
  };
}
498033
function modules() {
  // Bootstrap
  var bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*')
    .pipe(gulp.dest('./vendor/bootstrap'));
  // Font Awesome
  var fontAwesome = gulp.src('./node_modules/@fortawesome/**/*')
    .pipe(gulp.dest('./vendor'));
  // jQuery
  var jquery = gulp.src([
      './node_modules/jquery/dist/*',
      '!./node_modules/jquery/dist/core.js'
    ])
    .pipe(gulp.dest('./vendor/jquery'));
  return merge(bootstrap, fontAwesome, jquery);
}
1062830
public boolean inModuleHoistScope() {
    Node moduleRoot = getCfgRoot();
    if (moduleRoot.isFunction()) {
      // For wrapped modules, the function block is the module scope root.
      moduleRoot = moduleRoot.getLastChild();
    }
    return NodeUtil.isModuleScopeRoot(moduleRoot);
  }
435179
function (module) {
        "use strict";
    
        var plugins = {};
    
        var order;
        Object.defineProperty(this, 'order', {
            'get': function () {
                return order;
            },
            'set': function (value) {
                order = value;
            }
        });
    
        this.register = function (ID, plugin, group) {
    
            if (!group) group = 'default';
            if (!plugins[group]) plugins[group] = {};
    
            plugins[group][ID] = plugin;
    
        };
    
        this.get = function (group) {
    
            if (!group) group = 'default';
            var group = plugins[group];
    
            var ordered = [];
            for (var i in order) {
    
                var name = order[i];
                if (group[name]) ordered.push(group[name]);
    
            }
    
            // set all the plugins not in the ordered list
            for (var name in group) {
    
                if (!order || order.indexOf(name) === -1) ordered.push(group[name]);
    
            }
    
            return ordered;
    
        };
    
    }
1133091
function(parentModule, kbox, id, app, callback) {

  if (typeof callback === 'undefined' && typeof app === 'function') {
    callback = app;
    app = undefined;
  }

  // Try to load the module.
  return requireModule(parentModule, kbox, id, app)
  // If no module was loaded throw an error.
  .tap(function(mod) {
    if (!mod) {
      throw new Error('Cannot find module ' + id +
        ' try an npm install first.');
    }
  })
  // Handle different kinds of module initializations.
  .then(function(mod) {

    // Module was successfully loaded.
    if (typeof mod === 'object') {

      // Nothing extra needs to be done, just return module.
      return mod;

    } else if (typeof mod === 'function') {

      if (mod.length === 0) {

        // No arguments, so just execute function and return.
        return Promise.try(function() {
          return mod();
        })
        // Decorate any errors.
        .catch(function(err) {
          throw new KboxRequireError(id, err);
        });

      } else {

        // Argument names of the mod function.
        var args = inspect(mod);

        if (args.length === 1 && args[0] === 'kbox') {

          // Execute module function.
          return Promise.try(function() {
            return mod(kbox);
          })
          // Decorate any errors.
          .catch(function(err) {
            throw new KboxRequireError(id, err);
          });

        } else if (args.length === 2 &&
          args[0] === 'kbox' &&
          args[1] === 'app') {

          // Execute module function.
          return Promise.try(function() {
            return mod(kbox, app);
          })
          // Decorate any errors.
          .catch(function(err) {
            // Print a hopefully helpful warning for certain kinds of errors
            // @todo: this is pretty presumptuous and might be bad
            if (_.includes(err.message, 'Cannot read property')) {
              var warning = [
                'OH NO!',
                'It looks like something is wrong with your %s app named %s.',
                'We recommended purging this app and reinstalling it.',
                'This should help get it back into the correct state.'
              ];
              log.warn(format(warning.join(' '), id, app.name));
            }
            // Throw the error normally
            else {
              throw new KboxRequireError(id, err);
            }
          });

        } else {

          // Module function has an incorrect signature, throw an error.
          var funcString = mod.toString().split('\n')[0];
          throw new Error('Module "' + id + '" has an invalid ' +
            'signature. It was expected to be a function with a ' +
            'single argument of kbox, but instead it was: ' + funcString);

        }

      }

    } else {

      // This should never happen so assert fail if it does.
      assert.fail(undefined, undefined,
        'Required module expected to be either function or object');

    }

  })
  // Return.
  .nodeify(callback);

}
1369397
function modules() {
  // Bootstrap
  var bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*')
    .pipe(gulp.dest('./vendor/bootstrap'));
  // Font Awesome
  var fontAwesome = gulp.src('./node_modules/@fortawesome/**/*')
    .pipe(gulp.dest('./vendor'));
  // jQuery Easing
  var jqueryEasing = gulp.src('./node_modules/jquery.easing/*.js')
    .pipe(gulp.dest('./vendor/jquery-easing'));
  // jQuery
  var jquery = gulp.src([
      './node_modules/jquery/dist/*',
      '!./node_modules/jquery/dist/core.js'
    ])
    .pipe(gulp.dest('./vendor/jquery'));
  // Simple Line Icons
  var simpleLineIconsFonts = gulp.src('./node_modules/simple-line-icons/fonts/**')
    .pipe(gulp.dest('./vendor/simple-line-icons/fonts'));
  var simpleLineIconsCSS = gulp.src('./node_modules/simple-line-icons/css/**')
    .pipe(gulp.dest('./vendor/simple-line-icons/css'));
  return merge(bootstrap, fontAwesome, jquery, jqueryEasing, simpleLineIconsFonts, simpleLineIconsCSS);
}
876692
function analyzeModuleDefinition(node) {
	var args = node.arguments;
	var arg = 0;
	if ( arg < args.length
		 && args[arg].type === Syntax.Literal && typeof args[arg].value === 'string' ) {
		warning("module explicitly defined a module name '" + args[arg].value + "'");
		currentModule.name = args[arg].value;
		arg++;
	}
	if ( arg < args.length && args[arg].type === Syntax.ArrayExpression ) {
		currentModule.dependencies = convertValue(args[arg], "string[]");
		arg++;
	}
	if ( arg < args.length && args[arg].type === Syntax.FunctionExpression ) {
		currentModule.factory = args[arg];
		arg++;
	}
	if ( currentModule.dependencies && currentModule.factory ) {
		for ( var i = 0; i < currentModule.dependencies.length && i < currentModule.factory.params.length; i++ ) {
			var name = currentModule.factory.params[i].name;
			var module = resolveModuleName(currentModule.module, currentModule.dependencies[i]);
			debug("  import " + name + " from '" + module + "'");
			currentModule.localNames[name] = {
				module: module
				// no (or empty) path
			};
		}
	}
	if ( currentModule.factory ) {
		collectShortcuts(currentModule.factory.body);
	}
}
1165645
function generateModuleAst(moduleInfo) {
    var dependenciesExpr;
    var actualDependencies = moduleInfo.actualDependencies;
    var dependencies = (moduleInfo.dependencies || []).slice(0);

    if (actualDependencies instanceof Array) {
        dependenciesExpr = {
            type: SYNTAX.ArrayExpression,
            elements: []
        };

        var diffDependencies = subtract(
            actualDependencies,
            intersect(dependencies, actualDependencies)
        );
        dependencies.concat(diffDependencies).forEach(function (dependency) {
            dependenciesExpr.elements.push({
                type: SYNTAX.Literal,
                value: dependency,
                raw: '\'' + dependency + '\''
            });
        });
    }

    var defineArgs = [moduleInfo.factoryAst];
    if (dependenciesExpr) {
        defineArgs.unshift(dependenciesExpr);
    }
    var id = moduleInfo.id;
    if (id) {
        defineArgs.unshift({
            type: SYNTAX.Literal,
            value: moduleInfo.id,
            raw: '\'' + moduleInfo.id + '\''
        });
    }

    return {
        type: SYNTAX.CallExpression,
        callee: {
            type: SYNTAX.Identifier,
            name: LITERAL_DEFINE
        },
        arguments: defineArgs
    };
}
530587
function collectDependencies(module) {
    let paths = [];
    function pathsToAcceptingModules(path, root) {
      const requiredMe = parents[root.filename];
      if (module.hot._selfAccepted) {
        paths.push(path.concat(root.filename));
        return;
      }
      if (module.hot._selfDeclined) {
        return;
      }
      for (let next in requiredMe) {
        let parentHotRuntime = requiredMe[next].hot;
        if (parentHotRuntime._acceptedDependencies[root.filename]) {
          paths.push(path.concat(root.filename));
          continue;
        }
        if (parentHotRuntime._declinedDependencies[root.filename]) {
          continue;
        }
        pathsToAcceptingModules(path.concat(root.filename), requiredMe[next]);
      }
    }
    pathsToAcceptingModules([], module);
    return paths;
  }
1320195
function workFn() {
      var spec = getCurrentSpec();
      if (spec.$injector) {
        throw Error('Injector already created, can not register a module!');
      } else {
        var modules = spec.$modules || (spec.$modules = []);
        angular.forEach(moduleFns, function(module) {
          modules.push(module);
        });
      }
    }
748361
def modules
      modules = @modules.dup # in case the user pushes any on
      modules << @authentication_strategy
      modules << :db_password
      modules << :password_reset
      modules << :trackable  # needs configuration
      modules << :timeoutable if @timeout_in
      modules << :lifetimed if @max_session_lifetime
      modules << :brute_force if @max_consecutive_bad_logins_allowed
      modules
    end
830262
function CompileModules(inputTree, options) {
    if (!(this instanceof CompileModules)) {
        return new CompileModules(inputTree, options);
    }

    options || (options = {});

    var formatter = options.formatter;

    if (!formatter) {
        formatter = transpiler.formatters.DEFAULT;
    }

    if (typeof formatter === 'string') {
        formatter = transpiler.formatters[formatter];
    }

    var resolverClasses = options.resolvers;

    if (!resolverClasses) {
        resolverClasses = [ FileResolver ];
    }

    this.inputTree       = inputTree;
    this.resolverClasses = resolverClasses;
    this.formatter       = formatter;
    this.output          = options.output || '.';
    this.basePath        = options.basePath;
    this.sourceRoot      = options.sourceRoot || '/';
    this.description     = options.description;

    this._cache = {};
}
1003855
def belongs_to_module(t, module_name):
    ""
    if hasattr(t, '__func__'): return belongs_to_module(t.__func__, module_name)
    if not inspect.getmodule(t): return False
    return inspect.getmodule(t).__name__.startswith(module_name)
331920
function subtractModules(modulesA, modulesB) {
    const subtracted = [];
    for (const module of modulesA) {
      if (!modulesB.includes(module)) {
        subtracted.push(module);
      }
    }
    return subtracted;
  }
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;
	}
95497
private void installModule(final Node node, final ModuleContext module, final Handler<AsyncResult<Void>> doneHandler) {
    node.installModule(module.module(), doneHandler);
  }