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

Function loadPrism

packages/emcn/src/components/code/code.tsx:46–54  ·  view source on GitHub ↗

* Loads the Prism module once and caches both the in-flight promise and the * resolved module for reuse. * * @returns A promise resolving to the Prism highlighting utilities.

()

Source from the content-addressed store, hash-verified

44 * @returns A promise resolving to the Prism highlighting utilities.
45 */
46function loadPrism(): Promise<PrismModule> {
47 if (!prismModulePromise) {
48 prismModulePromise = import('./prism').then((mod) => {
49 resolvedPrism = mod
50 return mod
51 })
52 }
53 return prismModulePromise
54}
55
56/**
57 * Subscribes a client component to the lazily-loaded Prism module.

Callers 1

usePrismFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected