getEdgeTypeFilter(type) {

    const filter = $tw.wiki.getCacheForTiddler(this.edgeTypeFilterTRef, "tmap-edgeTypeFilter", () => {

      const allETy = $tm.indeces.allETy;
      const src = Object.keys(allETy);
      const tObj = $tw.wiki.getTiddler(this.edgeTypeFilterTRef);

      let filter = {};
      filter.raw = (tObj && tObj.fields.filter || '');
      filter.pretty = utils.getPrettyFilter(filter.raw);
      filter.matches = utils.getEdgeTypeMatches(filter.raw, allETy);
      filter.whitelist = utils.getLookupTable(filter.matches);

      return filter;

    });

    return (type ? filter[type] : filter);

  }
Method will return a tiddlywiki edge-type filter that is used to
decide which edge types are displayed by the graph.

Note: needs to be recalculated if the collection of edge types changed
in the wiki.

@param {("raw"|"pretty"|"matches"|"whitelist")} [type]
    Use this param to control the output type.
@result {*}
    Depends on the type param:
    - raw: the original filter string
    - pretty: the prettyfied filter string for usage in textareas
    - matches: {Array<string>} all matches
    - whitelist: A lookup table where all matches are true