code: function appendParams(url, specificParams) {
      // Assign default and specific parameters
      var params = Object.assign({}, defaultParams, specificParams);
  
      // Stringify the querystring params
      var paramsString = qs.stringify(params);
  
      // Empty params
      if (paramsString === '') {
        return url;
      }
  
      // Does url contain parameters already?
      var delim = url.includes('?') ? '&' : '?';
  
      return url + delim + paramsString;
    }
docs: Build REST params and correctly append them to URL.
  
  @param {string} url to be extended with params.
  @param {object} specificParams key/value pair of params.
  @returns {string} the extended url.