code: private static String getJsPackage(FileDescriptor file) {
      String protoPackage = file.getPackage();
      if (!protoPackage.isEmpty()) {
        return "proto." + protoPackage;
      }
      return "proto";
    }
docs: Returns the expected javascript package for protos based on the .proto file.