code: function convertVariationalPath(variations, from, toVariationId) {
      const toDir = variations.find(variation => variation.id === toVariationId).dir;
      const pattern = new RegExp(`(${variations.map(variation => variation.dir).join('|')})`);
      return from.replace(pattern, toDir);
  }
docs: TODO pull below out to (variation) helper