MCPcopy Create free account
hub / github.com/Noumena-Network/code / inferFamilyName

Function inferFamilyName

scripts/generate_slash_command_appendix.mjs:337–343  ·  view source on GitHub ↗
(specifier)

Source from the content-addressed store, hash-verified

335}
336
337function inferFamilyName(specifier) {
338 const relative = specifier.replace(/^\.\//, '')
339 const withoutIndex = relative.replace(/\/index\.js$/, '')
340 const withoutExt = withoutIndex.replace(/\.js$/, '')
341 const base = path.basename(withoutExt)
342 return base === 'remoteControlServer' ? '' : base
343}
344
345function parseImports(source) {
346 const map = new Map()

Calls

no outgoing calls

Tested by

no test coverage detected