MCPcopy Index your code
hub / github.com/visgl/deck.gl / getCustomId

Function getCustomId

scripts/write-heading-ids.ts:91–102  ·  view source on GitHub ↗

Parse a single line of text in a .md file. * @returns new content in 3 parts if custom id is needed, null otherwise.

(line: string)

Source from the content-addressed store, hash-verified

89 * @returns new content in 3 parts if custom id is needed, null otherwise.
90 */
91function getCustomId(line: string): [hash: string, headerContent: string, customId: string] | null {
92 const m = line.trim().match(headerTest);
93 if (!m) {
94 return null;
95 }
96 const m1 = m.groups!.headerContent.match(apiTest);
97 if (!m1) {
98 return null;
99 }
100 const customId = m1.groups!.code.toLowerCase();
101 return [m[1], m[2], `{#${customId}}`];
102}
103
104/** Process a md file. Rewrites the file content if custom ids are needed. */
105async function processFile(path: string): Promise<void> {

Callers 2

testFunction · 0.85
processFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…