INNER CODE UNIT · TypeScript

getWordAt

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

export function getWordAt(str: string, pos: number): string {
    const left = str.slice(0, pos + 1).search(/\S+$/);
    return str.slice(left, pos + 1);
}

/**
 * Retrieves the values from the `values.yaml`.
 */
export function getValuesFromFile(fileName: string): any {
    const filenames = getValueFileNamesFromConfig().reverse();
    const chartBasePath = getChartBasePath(fileName);
    if (chartBasePath === undefined) {
        return undefined;
    }

    const completeFilePaths = [];
    for (const filename of filenames) {
        completeFilePaths.push(path.join(chartBasePath, filename));

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…