MCPcopy
hub / github.com/code-hike/codehike / extractFlags

Function extractFlags

apps/web/components/code.tsx:150–158  ·  view source on GitHub ↗
(codeblock: RawCode)

Source from the content-addressed store, hash-verified

148}
149
150export function extractFlags(codeblock: RawCode) {
151 const flags =
152 codeblock.meta.split(" ").filter((flag) => flag.startsWith("-"))[0] ?? ""
153 const title =
154 codeblock.meta === flags
155 ? ""
156 : codeblock.meta.replace(" " + flags, "").trim()
157 return { title, flags: flags.slice(1).split("") }
158}

Callers 3

CodeFunction · 0.90
CodeFunction · 0.85
HighCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…