MCPcopy Create free account
hub / github.com/bvaughn/react-resizable-panels / encode

Function encode

integrations/tests/src/utils/serializer/encode.ts:41–46  ·  view source on GitHub ↗
(element: ReactElement<unknown>)

Source from the content-addressed store, hash-verified

39import { IFrame, type IFrameProps } from "../../components/IFrame";
40
41export function encode(element: ReactElement<unknown>) {
42 const json = encodeChildren([element]);
43 const stringified = JSON.stringify(json);
44
45 return encodeURIComponent(stringified);
46}
47
48function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] {
49 const elements: EncodedElement[] = [];

Callers 3

updateUrlFunction · 0.90
goToUrlFunction · 0.90
goToUrlWithIframeFunction · 0.90

Calls 1

encodeChildrenFunction · 0.85

Tested by

no test coverage detected