def add(self, path, text):
    """adds a javascript file to the export library"""
    include_path = path.replace(ROOT_DIR, '').replace('.js', '').strip("/")
    item = {
      "path": path,
      "include_path": include_path,
      "mode": "unknown",
      "text": text,
      "exports": []
    }

    for line in text.splitlines():
      if line.startswith("export"):
        words = line.split(" ")
        if words[1] == "var" or words[1] == 'class':
          item['mode'] = "multi"
        elif words[1] == "default":
          item['mode'] = "default"
        else:
          raise ValueError("unknown export type %s" % (words[1], ))
        item['exports'].append(words[2].strip(";"))

    if len(item['exports']) > 1 and item['mode'] == "default":
      raise ValueError(path % "can only export one default! path = %s")

    self.items[path] = item
dataset/ETHPy150Open dropbox/changes/webapp/scripts/write_includes.py/Exports.add/swapped operands of `%`