/**
 * Returns all but the last element of path, or "." if that would be the empty path.
 */
export function dirname(path) {
    return (path
        .split('/')
        .slice(0, -1)
        .join('/') || '.');
}
/**
 * Returns the last element of path, or "." if path is empty.
 */
export function basename(path) {
    return path.split('/').slice(-1)[0] || '.';
}
//# sourceMappingURL=path.js.map