MCPcopy 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

1export 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

latestFunction · 0.85
registerHookExtensionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected