MCPcopy Create free account
hub / github.com/composify-js/composify / stringifyAttributes

Function stringifyAttributes

packages/react/src/renderer/Parser/Parser.ts:175–185  ·  view source on GitHub ↗
(props: Record<string, unknown>)

Source from the content-addressed store, hash-verified

173};
174
175const stringifyAttributes = (props: Record<string, unknown>): string => {
176 return Object.entries(props)
177 .map(([key, value]) => {
178 if (typeof value === 'string') {
179 return `${key}="${value}"`;
180 }
181
182 return `${key}={${stringifyValue(value)}}`;
183 })
184 .join(' ');
185};
186
187const stringifyValue = (value: unknown): string => {
188 if (isNode(value)) {

Callers 1

stringifyFunction · 0.85

Calls 1

stringifyValueFunction · 0.85

Tested by

no test coverage detected