function removeTrailingSlash(base) {
    return base.endsWith('/')
        ? base.substring(0, base.length - 1) : base;
}
remove trailing slash

@param {string} base base
@return {string} base without trailing slash