src/extensions/default/RecentProjects/main.js
function parsePath(path) {
        var lastSlash = path.lastIndexOf("/"), folder, rest;
        if (lastSlash === path.length - 1) {
            lastSlash = path.slice(0, path.length - 1).lastIndexOf("/");
        }
        if (lastSlash >= 0) {
            rest = " - " + (lastSlash ? path.slice(0, lastSlash) : "/");
            folder = path.slice(lastSlash + 1);
        } else {
            rest = "/";
            folder = path;
        }

        return {path: path, folder: folder, rest: rest};
    }
function parsePath(path) {
        var lastSlash = path.lastIndexOf("/"), folder, rest;
        if (lastSlash === path.length - 1) {
            lastSlash = path.slice(0, path.length - 1).lastIndexOf("/");
        }
        if (lastSlash >= 0) {
            rest = " - " + (lastSlash ? path.slice(0, lastSlash) : "/");
            folder = path.slice(lastSlash + 1);
        } else {
            rest = "/";
            folder = path;
        }

        return {path: path, folder: folder, rest: rest};
    }
function parsePath ( path ) { var lastSlash = path . lastIndexOf ( "/" ) , folder , rest ; if ( lastSlash === path . length - 1 ) { lastSlash = path . slice ( 0 , path . length - 1 ) . lastIndexOf ( "/" ) ; } if ( lastSlash >= 0 ) { rest = " - " + ( lastSlash ? path . slice ( 0 , lastSlash ) : "/" ) ; folder = path . slice ( lastSlash + 1 ) ; } else { rest = "/" ; folder = path ; } return { path : path , folder : folder , rest : rest } ; }
Parses the path and returns an object with the full path, the folder name and the path without the folder.
@param {string} path The full path to the folder.
@return {{path: string, folder: string, rest: string}}
Parses the path and returns an object with the full path the folder name and the path without the folder .