INNER CODE UNIT · TypeScript

lastIndexOf

tim-koehler/Helm-Intellisense · src/utils.ts:195

        const lastIndexOf = possiblePathToChartDirectory.lastIndexOf(path.sep + dir);
        if (lastIndexOf !== -1) {
            possiblePathToChartDirectory = possiblePathToChartDirectory.substr(0, lastIndexOf);
            break;
        }
    }

    const currentFilesInDir = fs.readdirSync(possiblePathToChartDirectory);
    if (!currentFilesInDir.includes('Chart.yaml')) {
        return undefined;
    }

    return possiblePathToChartDirectory;
}

export function getNameOfChart(filePath: string): string | undefined {
    const chartBasePath = getChartBasePath(filePath);
    if (chartBasePath === undefined) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…