MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / getUserHome

Function getUserHome

packages/components/src/utils.ts:728–739  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

726 * @returns {string}
727 */
728export const getUserHome = (): string => {
729 let variableName = 'HOME'
730 if (process.platform === 'win32') {
731 variableName = 'USERPROFILE'
732 }
733
734 if (process.env[variableName] === undefined) {
735 // If for some reason the variable does not exist, fall back to current folder
736 return process.cwd()
737 }
738 return process.env[variableName] as string
739}
740
741/**
742 * Map ChatMessage to BaseMessage

Callers 10

initMethod · 0.90
initMethod · 0.90
initMethod · 0.90
validator.test.tsFile · 0.90
getStoragePathFunction · 0.90
validateVectorStorePathFunction · 0.90
getAllowedSQLiteBaseDirsFunction · 0.90
getStoragePathFunction · 0.90
getEncryptionKeyFilePathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected