MCPcopy Index your code
hub / github.com/tinyplex/tinybase / wrap

Function wrap

src/ui-solid/common/wrap.tsx:7–18  ·  view source on GitHub ↗
(
  children: JSXElement,
  separator?: JSXElement | string,
  encloseWithId?: boolean,
  id?: Id,
)

Source from the content-addressed store, hash-verified

5import {isArray, isUndefined} from '../../common/other.ts';
6
7export const wrap = (
8 children: JSXElement,
9 separator?: JSXElement | string,
10 encloseWithId?: boolean,
11 id?: Id,
12): JSXElement => {
13 const separated =
14 isUndefined(separator) || !isArray(children)
15 ? children
16 : arrayMap(children, (child, c) => (c > 0 ? [separator, child] : child));
17 return encloseWithId ? [id, ':{', separated, '}'] : separated;
18};

Callers 13

contentFunction · 0.90
contentFunction · 0.90
contentFunction · 0.90
CellViewFunction · 0.90
MetricViewFunction · 0.90
contentFunction · 0.90
contentFunction · 0.90
contentFunction · 0.90
contentFunction · 0.90
CheckpointViewFunction · 0.90
ResultCellViewFunction · 0.90
ValueViewFunction · 0.90

Calls 3

isUndefinedFunction · 0.90
isArrayFunction · 0.90
arrayMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…