MCPcopy
hub / github.com/BuilderIO/mitosis / parseNode

Function parseNode

packages/core/src/helpers/parse-node.ts:3–9  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

1import { parseJsx } from '../parsers/jsx';
2
3export const parseNode = (str: string) => {
4 return parseJsx(`
5 export default function MyComponent() {
6 return (${str})
7 }
8 `).children[0];
9};
10export const parseNodes = (str: string) => {
11 return parseJsx(`
12 export default function MyComponent() {

Callers

nothing calls this directly

Calls 1

parseJsxFunction · 0.90

Tested by

no test coverage detected