Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cosmiconfig/cosmiconfig
/ functions
Functions
95 in github.com/cosmiconfig/cosmiconfig
⨍
Functions
95
◇
Types & classes
23
↓ 17 callers
Method
absolutePath
(dir: string)
test/util.ts:50
↓ 10 callers
Function
cosmiconfig
( moduleName: string, options: Readonly<Partial<Options>> = {}, )
src/index.ts:196
↓ 9 callers
Method
clean
()
test/util.ts:104
↓ 9 callers
Function
cosmiconfigSync
( moduleName: string, options: Readonly<Partial<OptionsSync>> = {}, )
src/index.ts:211
↓ 9 callers
Method
createFile
(file: string, contents: string)
test/util.ts:62
↓ 9 callers
Method
deleteTempDir
()
test/util.ts:97
↓ 8 callers
Method
search
(from = '')
src/Explorer.ts:37
↓ 6 callers
Method
getSpyPathCalls
(spy: Mock | SpyInstance)
test/util.ts:70
↓ 6 callers
Method
load
(filepath: string)
src/Explorer.ts:23
↓ 5 callers
Method
createDir
(dir: string)
test/util.ts:57
↓ 4 callers
Function
emplace
(map: Map<K, V>, key: K, fn: () => V)
src/util.ts:6
↓ 4 callers
Function
getPropertyByPath
( source: { [key: string]: unknown }, path: string | Array<string>, )
src/util.ts:24
↓ 4 callers
Function
normalizeDirectorySlash
(pathname: string)
test/util.ts:8
↓ 3 callers
Method
#readConfiguration
( filepath: string, importStack: Array<string> = [], )
src/Explorer.ts:103
↓ 3 callers
Method
#readConfiguration
( filepath: string, importStack: Array<string> = [], )
src/ExplorerSync.ts:101
↓ 3 callers
Function
decodeFileContent
(buffer: Buffer)
src/util.ts:50
↓ 3 callers
Function
getExtensionDescription
(extension?: string)
src/ExplorerBase.ts:171
↓ 3 callers
Function
getLoaderFunctionsByName
(loaders: Loaders)
test/index.test.ts:68
↓ 2 callers
Method
load
(filepath: string)
src/ExplorerSync.ts:23
↓ 2 callers
Function
mergeAll
( // eslint-disable-next-line @typescript-eslint/no-explicit-any objects: ReadonlyArray<any>, options: M
src/merge.ts:46
↓ 2 callers
Function
mergeOptionsBase
( moduleName: string, defaults: IntOpts, options: Readonly<Partial<Opts>>, )
src/index.ts:98
↓ 2 callers
Function
removeUndefinedValuesFromObject
( options: Record<string, unknown>, )
src/util.ts:61
↓ 2 callers
Method
search
(from = '')
src/ExplorerSync.ts:35
↓ 2 callers
Function
utf16beBuffer
(contents: string)
test/util.ts:116
↓ 2 callers
Function
validateOptions
( options: Readonly<Partial<Options | OptionsSync>>, )
src/index.ts:140
↓ 1 callers
Method
#fileExists
(path: string)
src/Explorer.ts:183
↓ 1 callers
Method
#fileExists
(path: string)
src/ExplorerSync.ts:175
↓ 1 callers
Method
#getDirs
(startDir: string)
src/Explorer.ts:192
↓ 1 callers
Method
#getDirs
(startDir: string)
src/ExplorerSync.ts:184
↓ 1 callers
Method
#loadConfigFileWithImports
( filepath: string, contents: string, importStack: Array<string>, )
src/Explorer.ts:114
↓ 1 callers
Method
#loadConfigFileWithImports
( filepath: string, contents: string, importStack: Array<string>, )
src/ExplorerSync.ts:112
↓ 1 callers
Method
#loadConfiguration
( filepath: string, contents: string, )
src/Explorer.ts:145
↓ 1 callers
Method
#loadConfiguration
(filepath: string, contents: string)
src/ExplorerSync.ts:140
↓ 1 callers
Function
checkConfigResult
( mock: SpyInstance, instanceNum: number, expectedLoaderNames: Record<string, string>, expectedExplore
test/index.test.ts:77
↓ 1 callers
Function
checkResult
( mock: SpyInstance, instanceNum: number, expectedLoaders: any, expectedSearchPlaces:
test/index.test.ts:118
↓ 1 callers
Function
checkResult
(result: any)
test/search-strategies.test.ts:21
↓ 1 callers
Function
checkResult
(result: any)
test/failed-files.test.ts:120
↓ 1 callers
Function
checkResult
(result: any)
test/successful-files.test.ts:35
↓ 1 callers
Function
checkResult
( statSpy: any, readFileSpy: any, result: any, files: any, )
test/failed-directories.test.ts:113
↓ 1 callers
Function
checkResult
(result: any)
test/import.test.ts:23
↓ 1 callers
Function
checkResult
(readFileSpy: any, result: any, files: any)
test/caches.test.ts:63
↓ 1 callers
Function
checkResult
(readFileSpy: any, result: any, files: any)
test/successful-directories.test.ts:99
↓ 1 callers
Function
checkResult
( constructFiles: Array<string>, readFileSpy: SpyInstance, result: any, )
test/meta-config.test.ts:147
↓ 1 callers
Function
checkResultBase
( mock: MockInstance, instanceNum: number, expectedLoaderFunctionNames: any, )
test/index.test.ts:362
↓ 1 callers
Function
getDefaultSearchPlaces
(moduleName: string)
src/defaults.ts:3
↓ 1 callers
Function
getDefaultSearchPlacesSync
(moduleName: string)
src/defaults.ts:29
↓ 1 callers
Function
getResolvedSearchPlaces
( moduleName: string, toolDefinedSearchPlaces: Array<string>, userConfiguredOptions: T, )
src/index.ts:80
↓ 1 callers
Function
getUserDefinedOptionsFromMetaConfig
()
src/index.ts:38
↓ 1 callers
Function
isDirectory
(path: string)
src/util.ts:71
↓ 1 callers
Function
isDirectorySync
(path: string)
src/util.ts:86
↓ 1 callers
Function
isPlainObject
(obj: unknown)
src/merge.ts:9
↓ 1 callers
Function
loadJsSync
(filepath)
src/loaders.ts:7
↓ 1 callers
Function
merge
(target: any, source: any, options: MergeOptions)
src/merge.ts:18
↓ 1 callers
Function
mergeOptions
( moduleName: string, options: Readonly<Partial<Options>>, )
src/index.ts:154
↓ 1 callers
Function
mergeOptionsSync
( moduleName: string, options: Readonly<Partial<OptionsSync>>, )
src/index.ts:175
↓ 1 callers
Function
randomString
()
test/successful-files.test.ts:16
↓ 1 callers
Function
randomString
()
test/successful-directories.test.ts:24
↓ 1 callers
Function
runTest
()
test/meta-config.test.ts:68
Function
#validateConfig
()
src/ExplorerBase.ts:44
Function
clearCaches
()
src/ExplorerBase.ts:79
Function
clearLoadCache
()
src/ExplorerBase.ts:67
Function
clearSearchCache
()
src/ExplorerBase.ts:73
Function
constructor
(options: Readonly<T>)
src/ExplorerBase.ts:31
Method
constructor
(options: InternalOptionsSync)
test/index.test.ts:37
Method
constructor
(options: InternalOptions)
test/index.test.ts:54
Method
constructor
()
test/util.ts:17
Function
getGlobalConfigDir
()
src/ExplorerBase.ts:144
Function
getGlobalDirs
(startDir: string)
src/ExplorerBase.ts:148
Function
getSearchPlacesForDir
( dir: DirToSearch, globalConfigPlaces: Array<string>, )
src/ExplorerBase.ts:135
Function
identity
(x)
src/index.ts:34
Function
isNotMjs
(filePath: string)
test/util.ts:110
Function
jsLoader
()
test/index.test.ts:255
Function
jsonLoader
()
test/index.test.ts:256
Function
loadGrumbly
()
test/successful-directories.test.ts:1654
Function
loadJs
()
test/failed-directories.test.ts:699
Function
loadJs
(filepath)
src/loaders.ts:12
Function
loadJson
(filepath, content)
src/loaders.ts:36
Method
loadSync
(filepath: string)
src/ExplorerSync.ts:225
Function
loadThings
(filepath: any, content: any)
test/successful-directories.test.ts:1645
Function
loadThingsAsync
()
test/failed-files.test.ts:233
Function
loadThingsAsync
()
test/successful-files.test.ts:540
Function
loadThingsAsync
()
test/failed-directories.test.ts:736
Function
loadThingsAsync
()
test/successful-directories.test.ts:1922
Function
loadThingsSync
()
test/successful-files.test.ts:565
Function
loadThingsSync
()
test/successful-directories.test.ts:1961
Function
loadYaml
(filepath, content)
src/loaders.ts:46
Function
loadingMetaConfig
(value: boolean)
src/ExplorerBase.ts:40
Function
mjsLoader
()
test/index.test.ts:259
Function
noExtLoader
()
test/index.test.ts:254
Method
searchSync
(from = '')
src/ExplorerSync.ts:233
Function
toCosmiconfigResult
( filepath: string, config: Config, )
src/ExplorerBase.ts:84
Function
transform
(innerResult)
test/failed-files.test.ts:203
Function
transform
(result: any)
test/successful-files.test.ts:406
Function
validateImports
( containingFilePath: string, imports: Array<unknown>, importStack: Array<string>, )
src/ExplorerBase.ts:107
Function
yamlLoader
()
test/index.test.ts:257