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

Function firstMatch

scripts/generate_slash_command_appendix.mjs:276–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275function parseMetadata(source) {
276 const firstMatch = pattern => source.match(pattern)?.[1] ?? ''
277 const name = firstMatch(/name:\s*'([^']+)'/)
278 const type = firstMatch(/type:\s*'([^']+)'/)
279 const description = firstMatch(/description:\s*`([^`]+)`/) || firstMatch(/description:\s*'([^']+)'/)

Callers 3

parseMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected