code: function replaceUrlParameters (url, urlParameters) {
    var replacedUrl = url;
    for (var urlParameter in urlParameters) {
      var regex = (urlParameter === '*'
        ? new RegExp('\\*') // The first occurrence of the literal character '*'.
        : new RegExp(':' + urlParameter, 'g')); // All occurrences of `:param`.
      var urlValue = urlParameters[urlParameter];
      replacedUrl = replacedUrl.replace(regex, urlValue);
    }
    return replacedUrl;
  }
docs: Replace URL parameters like ':param' or '*' with the provided example values.