code: function convertToAlias(id, paths) {
      var invertedPaths = _.invert(paths);
      if (invertedPaths[id]) {
          return invertedPaths[id];
      }
      else {
          return id;
      }
  }
docs: Converts a module path to the alias used - the reverse mapping of the
  `paths:` setting in RequireJS configuration.