MCPcopy Index your code
hub / github.com/simstudioai/sim / extractSpreadBase

Function extractSpreadBase

scripts/generate-docs.ts:1004–1007  ·  view source on GitHub ↗

* Extract the name of the spread base block (e.g., "GitHubBlock" from "...GitHubBlock")

(blockContent: string)

Source from the content-addressed store, hash-verified

1002 * Extract the name of the spread base block (e.g., "GitHubBlock" from "...GitHubBlock")
1003 */
1004function extractSpreadBase(blockContent: string): string | null {
1005 const spreadMatch = blockContent.match(/^\s*\.\.\.(\w+Block)\s*,/m)
1006 return spreadMatch ? spreadMatch[1] : null
1007}
1008
1009/**
1010 * Extract block config from a specific block's content

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected