MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / trimCode

Function trimCode

packages/react-live/src/utils/transpile/index.ts:8–8  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

6import { Transform } from "sucrase";
7
8const trimCode = (code: string) => code.trim().replace(/;$/, "");
9const wrapReturn = (code: string) => `return (${code})`;
10
11type GenerateOptions = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected