Binding for an entire module namespace created by const x = goog.require(Type)('...')
424976
static Binding from(
      ModuleMetadata metadata, Node sourceNode, String closureNamespace, CreatedBy createdBy) {
    Preconditions.checkArgument(
        createdBy.isClosureImport(),
        "Expected goog.require(Type) or goog.forwardDeclare, got %s",
        createdBy);
    return new AutoValue_Binding(
        metadata,
        sourceNode,
        /* originatingExport= */ null,
        /* isModuleNamespace= */ true,
        closureNamespace,
        createdBy);
  }
50034
function (namespace, names){
    if (names){
      for (let i = 0, n = names.length; i < n; ++i){
        let typeName = names[i];
        if (namespace.names.hasOwnProperty(typeName)){
          this.names[typeName] = namespace.names[typeName];
        }
        else {
          throw new ReferenceError('import error: undefined type \'' + typeName + '\'');
        }
      }
    }
    else {
      // import *
      for (let typeName in namespace.names){
        if (namespace.names.hasOwnProperty(typeName)){
          this.names[typeName] = namespace.names[typeName];
        }
      }
    }
    return this;
  }
921252
def _generate_base_namespace_module(self, namespace):
        # type: (ApiNamespace) -> None
        """"""

        self.cur_namespace = namespace
        self.import_tracker.clear()
        generate_module_header(self)

        self.emit_placeholder('imports_needed_for_typing')
        self.emit_raw(validators_import_with_type_ignore)

        # Generate import statements for all referenced namespaces.
        self._generate_imports_for_referenced_namespaces(namespace)

        self._generate_typevars()

        for annotation_type in namespace.annotation_types:
            self._generate_annotation_type_class(namespace, annotation_type)

        for data_type in namespace.linearize_data_types():
            if isinstance(data_type, Struct):
                self._generate_struct_class(namespace, data_type)
            elif isinstance(data_type, Union):
                self._generate_union_class(namespace, data_type)
            else:
                raise TypeError('Cannot handle type %r' % type(data_type))

        for alias in namespace.linearize_aliases():
            self._generate_alias_definition(namespace, alias)

        self._generate_routes(namespace)
        self._generate_imports_needed_for_typing()
157284
function(name, type) {
        type = type || 'Module';
        if (typeof name === 'string') {
            name = name.replace(/\-([a-zA-Z0-9])/, function(match, ref) {
                return ref.toUpperCase();
            })
                .replace(new RegExp('$|' + type + '$', 'i'), type);
        }
        return name;
    }
426563
function gnodeJsExtensionCompiler (module, filename) {
  var content = fs.readFileSync(filename, 'utf8');

  // remove the Byte Order Marker if present
  content = stripBOM(content);

  // strip away the shebang if present
  content = stripShebang(content);

  if (genFunExp.test(content) && !isValid(content)) {
    // compile JS via facebook/regenerator
    content = regenerator.compile(content, {
      includeRuntime: 'object' !== typeof regeneratorRuntime
    }).code;
  }

  module._compile(content, filename);
}
403312
function (namespace) {
        var declaration = importDeclaration(context)

        var imports = Exports.get(declaration.source.value, context)
        if (imports == null) return null

        if (imports.errors.length) {
          imports.reportErrors(context, declaration)
          return
        }

        if (!imports.size) {
          context.report(namespace,
            `No exported names found in module '${declaration.source.value}'.`)
        }
      }
106238
@Override
  public String extractClassNameIfProvide(Node node, Node parent) {
    String namespace = extractClassNameIfGoog(node, parent, "goog.provide");
    if (namespace == null) {
      namespace = extractClassNameIfGoog(node, parent, "goog.module");
    }
    return namespace;
  }
1000408
function GlobalModule(name) {
    Module.call(this, name, ['$global'], function($global) {

      /* Find a property with a prefix */
      function prefix(property, scope, onlyPrefixed) {

        /* Check non prefixes property if we have to */
        if ((! onlyPrefixed) && (property in scope)) return scope[property];

        /* Check the various prefixed properties, if we have one */
        var prefixes = ["Ms", "ms", "Moz", "moz", "WebKit", "webkit"];
        for (var i in prefixes) {
          var prefixed = prefixes[i] + property;
          if (prefixed in scope) return scope[prefixed];
        }

        /* Things like "window.crypto" become "window.webkitCrypto" */
        if (property[0] !== property[0].toUpperCase()) {
          return prefix(property[0].toUpperCase() + property.substring(1), scope, true);
        } else {
          return undefined;
        }
      }

      /* Find a property recursively */
      function find(definition, scope) {
        if (! scope) return undefined;
        if (! definition) return undefined;
        switch (definition.length) {
          case 0:  return undefined;
          case 1:  return prefix(definition[0], scope);
          default: return find(definition.slice(1), prefix(definition[0], scope));
        }
      }

      return find(this.name.substring(8).split('.'), $global);
    }, true);
  }
1188749
function createModule(moduleName) {
    var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
    var initialState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
    var namespaceActions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;


    if ((typeof moduleName === 'undefined' ? 'undefined' : _typeof(moduleName)) == 'object') {
        console.warn('createModule was called with what appears to be' + ' the deprecated 1.x signature (schema [, initalState , namespace]).' + ' Please update usage to the new format (moduleName, schema [, initialState, namespaceActions])' + ' before the next major release of create-redux-module.' + ' Attempting to convert to new format.');
        var map = {
            schema: moduleName,
            initialState: schema,
            namespaceActions: typeof initialState == 'string',
            moduleName: typeof initialState == 'string' ? initialState : 'unknown_module'
        };
        moduleName = map.moduleName;
        schema = map.schema;
        initialState = map.initialState;
        namespaceActions = map.namespaceActions;
    }

    var actions = {};
    var handlers = {};

    function createActionHandler(actionName) {
        var baseType = actionCase(actionName);

        if (typeof namespaceActions == 'string') {
            namespaceActions = [namespaceActions];
        }

        var actionType = namespaceActions === true || Array.isArray(namespaceActions) && namespaceActions.indexOf(actionName) > -1 ? moduleName + '/' + baseType : baseType;

        var actionCreator = createActionCreator(actionType);
        var handler = function handler(state, action) {
            return state;
        };

        var def = schema[actionName];
        if (def === null) {
            // default as above
        } else if (typeof def == 'function') {
            handler = def;
        } else if (Array.isArray(def)) {
            actionCreator = def[0] || actionCreator;
            handler = def[1] || handler;
        } else if ((typeof def === 'undefined' ? 'undefined' : _typeof(def)) == 'object' && def.promise) {
            schema[actionName] = createSchemaPromiseEntry(def, actionName, actions);
            createActionHandler(actionName);

            var requestActionName = actionName + 'Pending';
            schema[requestActionName] = createSchemaPendingEntry();
            createActionHandler(requestActionName);

            var successActionName = actionName + 'Success';
            schema[successActionName] = createSchemaSuccessEntry(def, successActionName);
            createActionHandler(successActionName);

            var failureActionName = actionName + 'Failure';
            schema[failureActionName] = createSchemaFailureEntry(def, failureActionName);
            createActionHandler(failureActionName);

            return;
        } else {
            throw new Error('Incorrect schema format, [' + actionName + '] must be a handlerFn, array, API object, Promise object, or null');
        }

        actions[actionName] = actionCreator.bind({
            moduleName: moduleName,
            baseType: baseType,
            type: actionType,
            actionName: actionName,
            actions: actions // reference other actions from this action
        });

        actions[actionName].toString = function () {
            return actionType.toString();
        };

        handlers[actionType] = handler;
    }

    Object.keys(schema).forEach(createActionHandler);

    var reducer = function reducer() {
        var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
        var action = arguments[1];

        var handler = handlers[action.type];
        return handler ? handler(state, action) : state;
    };

    // sas = [initialState, action, newState]
    var test = function test() {
        for (var _len3 = arguments.length, sas = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
            sas[_key3] = arguments[_key3];
        }

        sas.forEach(function (_ref) {
            var _ref2 = _slicedToArray(_ref, 3),
                initialState = _ref2[0],
                action = _ref2[1],
                newState = _ref2[2];

            _assert2.default.deepEqual(reducer(initialState, action), newState, moduleName + '.reducer' + ('(' + JSON.stringify(initialState)) + (', ' + JSON.stringify(action) + ') !== ') + ('' + JSON.stringify(newState)));
        });
    };

    var module = {
        actions: actions,
        reducer: reducer,
        mapDispatch: mapDispatch.bind(null, actions),
        test: test
    };
    module.toString = function () {
        return moduleName.toString();
    };

    return module;
}
49993
function namespaceType (ns /* : string */) /* : string */ {
  const parts = ns.split(':')
  if (parts.length < 2) {
    return ''
  }
  return parts.slice(0, -1).join(':')
}
830620
def from_module_dict(cls, environment, module_dict, globals):
        
        return cls._from_namespace(environment, module_dict, globals)
369452
def add_namespace(self, module):
        
        uri = module.search_one("namespace").arg
        prefix = module.search_one("prefix").arg
        if uri in self.namespaces: return self.namespaces[uri]
        end = 1
        new = prefix
        while new in list(self.namespaces.values()):
            new = "%s%x" % (prefix,end)
            end += 1
        self.namespaces[uri] = new
        self.module_prefixes[module.arg] = new
        for inc in module.search("include"):
            self.module_prefixes[inc.arg] = new
        return new
318320
function createModuleConfig(loader) {
	var tmp = require("tmp");
	var config = {};
	var virtualModules = loader.virtualModules || {};
	for(var moduleName in virtualModules) {
		var filename = tmp.fileSync().name;
		var source = virtualModules[moduleName];
		fs.writeFileSync(filename, source, "utf8");

		var paths = config.paths = config.paths || {};
		paths[moduleName] = "file:"+filename;
	}
	return config;
}
497537
private String getEs6ModuleNameFromImportNode(NodeTraversal t, Node n) {
    String importName = n.getLastChild().getString();
    boolean isNamespaceImport = importName.startsWith("goog:");
    if (isNamespaceImport) {
      // Allow importing Closure namespace objects (e.g. from goog.provide or goog.module) as
      //   import ... from 'goog:my.ns.Object'.
      // These are rewritten to plain namespace object accesses.
      return importName.substring("goog:".length());
    } else {
      ModuleLoader.ModulePath modulePath =
          t.getInput()
              .getPath()
              .resolveJsModule(importName, n.getSourceFileName(), n.getLineno(), n.getCharno());
      if (modulePath == null) {
        // The module loader issues an error
        // Fall back to assuming the module is a file path
        modulePath = t.getInput().getPath().resolveModuleAsPath(importName);
      }
      return modulePath.toModuleName();
    }
  }
431817
function outputAll( code, moduleName ) {
    try {
        let out = outputComments( code );
        out += "  module.exports = function() {\n";
        out += outputNeededConstants( code );
        out += `    //-------------------
    // Class definition.
    const ViewClass = function( args ) {
      try {
        if( typeof args === 'undefined' ) args = {};
        this.$elements = {};
        ${outputClassBody(code)}
      }
      catch( ex ) {
        console.error('${moduleName}', ex);
        throw Error('Instantiation error in XJS of ${JSON.stringify(moduleName)}:\\n' + ex)
      }
    };\n`;
        out += generate( code.section.statics, "Static members.", "    " );
        out += "    return ViewClass;\n";
        out += "  }();\n";
        return out;
    } catch ( ex ) {
        bubble( ex, "outputAll()" );
        return null;
    }
}
238207
function bindNamespaces() {
  for (var namespace in namespaces) {
    for (var func in namespaces[namespace]) {
      namespaces[namespace][func] = namespaces[namespace][func].bind(this);
    }

    this[namespace] = namespaces[namespace];
  };
}
784414
function getGlob() {
			if (isNode) {
				return loader.import("@node-require", { name: module.id })
					.then(function(nodeRequire) {
						return nodeRequire("glob");
					});
			}

			return Promise.resolve();
		}