docs: function(data) {
          data = typeof data === "string" ? JSON.parse(data) : data;
  
          var current,
              fileUrl,
              type,
              asset,
              paths = Crafty.paths(),
              getFilePath = function(type, f) {
                  return f.search("://") === -1
                      ? type === "audio"
                          ? paths.audio + f
                          : paths.images + f
                      : f;
              };
  
          for (type in data) {
              for (asset in data[type]) {
                  if (!data[type].hasOwnProperty(asset)) continue; // maintain compatibility to other frameworks while iterating array
  
                  current = data[type][asset];
  
                  if (type === "audio") {
                      if (typeof current === "object") {
                          for (var i in current) {
                              fileUrl = getFilePath(type, current[i]);
                              if (Crafty.asset(fileUrl))
                                  Crafty.audio.remove(asset);
                          }
                      } else if (typeof current === "string") {
                          fileUrl = getFilePath(type, current);
                          if (Crafty.asset(fileUrl)) Crafty.audio.remove(asset);
                      }
                  } else {
                      asset = type === "sprites" ? asset : current;
                      fileUrl = getFilePath(type, asset);
                      if (Crafty.asset(fileUrl)) {
                          if (type === "sprites")
                              for (var comp in current.map)
                                  delete Crafty.components()[comp];
                          delete Crafty.assets[fileUrl];
                      }
                  }
              }
          }
      }