MCPcopy Create free account
hub / github.com/hashintel/hash / normalizeVaultMountPath

Function normalizeVaultMountPath

libs/@local/hash-backend-utils/src/vault.ts:32–38  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

30 * @returns The normalized path, or undefined if invalid/empty
31 */
32const normalizeVaultMountPath = (path: string): string | undefined => {
33 const normalized = path.trim().replace(/^\/|\/$/g, "");
34 if (!normalized || !vaultMountPathRegex.test(normalized)) {
35 return undefined;
36 }
37 return normalized;
38};
39
40type VaultLoginResult = {
41 client_token: string;

Callers 2

constructorMethod · 0.85
createVaultClientFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected