function chopSlash(path) {
    if ((path.charAt(path.length - 1) == '/') && (path.length > 1)) {
        return path.substring(0, path.length - 1);
    }
    return path;
}
// If there is an ending slash, remove it
If there is an ending slash, remove it
If there is an ending slash remove it
function chopSlash(path) {
    if ((path.charAt(path.length - 1) == '/') && (path.length > 1)) {
        return path.substring(0, path.length - 1);
    }
    return path;
}
function chopSlash ( path ) { if ( ( path . charAt ( path . length - 1 ) == '/' ) && ( path . length > 1 ) ) { return path . substring ( 0 , path . length - 1 ) ; } return path ; }
If there is an ending slash, remove it
If there is an ending slash remove it