code: function stripTrailingSlash(url) {
          var arr = url.split('/');
          if (arr[arr.length - 1] === '') {
              arr.pop();
          }
          return arr.join('/');
      }
docs: /*
  Strip potential trailing slash in url
  
  @param url the url to remove potential trailing slash from
  @returns {string} url the url without trailing slash