INNER CODE UNIT · TypeScript
left
tim-koehler/Helm-Intellisense · src/utils.ts:38
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));
}