code: private void registerAnyProvidedPrefixes(String ns, Node node, JSModule module) {
      int pos = ns.indexOf('.');
      while (pos != -1) {
        String prefixNs = ns.substring(0, pos);
        pos = ns.indexOf('.', pos + 1);
        if (providedNames.containsKey(prefixNs)) {
          providedNames.get(prefixNs).addProvide(node, module, /* explicit= */ false);
        } else {
          providedNames.put(
              prefixNs,
              new ProvidedName(
                  prefixNs, node, module, /* explicit= */ false, /* fromPreviousProvide= */ false));
        }
      }
    }
docs: Registers ProvidedNames for prefix namespaces if they haven't already been defined. The prefix
  namespaces must be registered in order from shortest to longest.
  
  @param ns The namespace whose prefixes may need to be provided.
  @param node The EXPR of the provide call.
  @param module The current module.