Check if the namespace is allowed by any of our adapters.

@param {String} namespace The namespace that needs to be enabled
@returns {Boolean|Promise} Indication if the namespace is enabled by our adapters.
@public
334796
function enabled(namespace) {
  var async = [];

  for (var i = 0; i < adapters.length; i++) {
    if (adapters[i].async) {
      async.push(adapters[i]);
      continue;
    }

    if (adapters[i](namespace)) return true;
  }

  if (!async.length) return false;

  //
  // Now that we know that we Async functions, we know we run in an ES6
  // environment and can use all the API's that they offer, in this case
  // we want to return a Promise so that we can `await` in React-Native
  // for an async adapter.
  //
  return new Promise(function pinky(resolve) {
    Promise.all(
      async.map(function prebind(fn) {
        return fn(namespace);
      })
    ).then(function resolved(values) {
      resolve(values.some(Boolean));
    });
  });
}
485874
private boolean isReadable(String namespace, String name) {
    Table table = getMetaStoreUtil().getTable(namespace, name);
    if (isManaged(table) || isExternal(table)) { // readable table types
      try {
        // get a descriptor for the table. if this succeeds, it is readable
        HiveUtils.descriptorForTable(conf, table);
        return true;
      } catch (DatasetException e) {
        // not a readable table
      } catch (IllegalStateException e) {
        // not a readable table
      } catch (IllegalArgumentException e) {
        // not a readable table
      } catch (UnsupportedOperationException e) {
        // not a readable table
      }
    }
    return false;
  }
1147661
protected function isPlugin(string $namespace, string $name): bool
    {
        if (preg_match('/^Spryker[a-zA-Z]*\\\\[a-zA-Z]+\\\\[a-zA-Z]+\\\\Dependency\\\\Plugin\b/', $namespace) && preg_match('/^\w+Interface$/', $name)) {
            return true;
        }

        if (preg_match('/^Spryker[a-zA-Z]*\\\\[a-zA-Z]+\\\\[a-zA-Z]+\\\\Communication\\\\Plugin\b/', $namespace) && preg_match('/^\w+Plugin$/', $name)) {
            return true;
        }

        return false;
    }
1165677
def namespace_match(pattern: str, namespace: str):
    
    if pattern[0] == '*' and namespace.endswith(pattern[1:]):
        return True
    elif pattern == namespace:
        return True
    return False
21959
def check
      @definition.namespaces.each do |(namespace, ns)|
        ns.items.each do |key, _|
          lookup(namespace, key)
        end
      end
    end
543879
function namespaceBoundary(namespace, line) {
      // Demarcate a namespace "boundary" to build up an array of namespace line
      // "ranges" to be able to find which namespace a piece of code belongs to.
      if (currentNamespaceRange) {
        namespaceRanges.push(currentNamespaceRange);
      }
      if (namespace) {
        currentNamespaceRange = {
          name: namespace,
          line: line
        };
      }
    }
142117
public boolean hasObjectWithPrefix(NamingConstants.JavaColonNamespace namespace, String name) throws NamingException {
        if (namespace == NamingConstants.JavaColonNamespace.COMP) {
            return hasObjectWithPrefix(compLock, compBindings, name);
        }
        if (namespace == NamingConstants.JavaColonNamespace.COMP_ENV) {
            return hasObjectWithPrefix(compLock, compEnvBindings, name);
        }
        if (namespace == this.namespace) {
            return hasObjectWithPrefix(nonCompEnvLock, nonCompBindings, name);
        }
        return false;
    }
1252368
function disable(namespaces) {
  var split = (namespaces || '').split(/[\s,]+/);
  var len = split.length;

  function removeNamespaceFromNames(namespaces){
    _.remove(exports.names, function(name){
      return name.toString() === '/^' + namespaces + '$/';
    });
  }

  for (var i = 0; i < len; i++) {
    if (!split[i]) continue; // ignore empty strings
    namespaces = split[i].replace(/\*/g, '.*?');
    if (namespaces[0] === '-') {
      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
    } else {
      removeNamespaceFromNames(namespaces);
      exports.skips.push(new RegExp('^' + namespaces + '$'));
      loggerEventBus.emit('disable', split[i]);
    }
  }

  exports.save(namespaces);
}
1274945
function isAbiNamespaceCall (node) {
  return Object.keys(abiNamespace).some((key) => abiNamespace.hasOwnProperty(key) && node.children && node.children[0] && isSpecialVariableAccess(node.children[0], abiNamespace[key]))
}
81509
public boolean hasExtension(String elementName, String namespace) {
        if (elementName == null) {
            return hasExtension(namespace);
        }
        String key = XmppStringUtils.generateKey(elementName, namespace);
        synchronized (packetExtensions) {
            return packetExtensions.containsKey(key);
        }
    }
343205
function isHtmlNamespace(node) {
            var ns;
            return typeof node.namespaceURI == UNDEF || ((ns = node.namespaceURI) === null || ns == "http://www.w3.org/1999/xhtml");
        }
209713
function () {
      var _this5 = this;

      var namespaces = _emberRuntimeSystemNative_array.A(_emberRuntimeSystemNamespace.default.NAMESPACES);
      var types = _emberRuntimeSystemNative_array.A();

      namespaces.forEach(function (namespace) {
        for (var key in namespace) {
          if (!namespace.hasOwnProperty(key)) {
            continue;
          }
          // Even though we will filter again in `getModelTypes`,
          // we should not call `lookupFactory` on non-models
          // (especially when `EmberENV.MODEL_FACTORY_INJECTIONS` is `true`)
          if (!_this5.detect(namespace[key])) {
            continue;
          }
          var name = _emberRuntimeSystemString.dasherize(key);
          if (!(namespace instanceof _emberApplicationSystemApplication.default) && namespace.toString()) {
            name = namespace + '/' + name;
          }
          types.push(name);
        }
      });
      return types;
    }
125020
public boolean isNamespacePresent(final String requestedNamespace) {
    checkArgument(requestedNamespace.length() > 0);
    checkArgument(!requestedNamespace.endsWith(DELIM));
    final String probe = requestedNamespace + DELIM;
    return Iterables.any(params.keySet(), StringUtils.startsWith(probe));
  }
1238597
function qualify(name, namespace) {
  if (~name.indexOf('.')) {
    name = name.replace(/^\./, ''); // Allow absolute referencing.
  } else if (namespace) {
    name = namespace + '.' + name;
  }
  name.split('.').forEach(function (part) {
    if (!isValidName(part)) {
      throw new Error(f('invalid name: %j', name));
    }
  });
  var tail = unqualify(name);
  // Primitives are always in the global namespace.
  return isPrimitive(tail) ? tail : name;
}
464475
public function canHandle($type, $namespace)
   {
      # no type; namespace must match
      if ($type === null) {
         if ($this->namespace === null || $namespace !== $this->namespace) {
            return false;
         }
      }
      else {
         if ($this->type !== $type) {
            return false;
         }
         else if ($namespace !== null && $this->namespace !== $namespace) {
            return false;
         }
         else if ($namespace === null && $this->namespace !== null) {
            return false;
         }
      }

      return true;
   }
987854
function disable() {
		const namespaces = [
			...createDebug.names.map(toNamespace),
			...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
		].join(',');
		createDebug.enable('');
		return namespaces;
	}
1046802
function(namespace, handler) {
            if (Logger.namespaces[namespace] == null) {
                Logger.namespaces[namespace] = new Logger({
                    namespace: namespace,
                    handler: handler
                });
            }
            return Logger.namespaces[namespace];
        }