Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/directus/directus
/ getModuleDefault
Function
getModuleDefault
api/src/utils/get-module-default.ts:1–7 ·
view source on GitHub ↗
(mod: T | { default: T })
Source
from the content-addressed store, hash-verified
1
export
default
function
getModuleDefault<T extends object>(mod: T | { default: T }): T {
2
if
(
'default'
in mod) {
3
return
mod.default;
4
}
5
6
return
mod;
7
}
Callers
6
latest
Function · 0.85
registerHookExtension
Method · 0.85
registerEndpointExtension
Method · 0.85
registerOperationExtension
Method · 0.85
registerBundleExtension
Method · 0.85
registerInternalOperations
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected