MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / compose

Function compose

packages/core/src/util/path.ts:29–42  ·  view source on GitHub ↗
(path1: string, path2: string)

Source from the content-addressed store, hash-verified

27import range from 'lodash/range';
28
29export const compose = (path1: string, path2: string) => {
30 let p1 = path1;
31 if (!isEmpty(path1) && !isEmpty(path2) && !path2.startsWith('[')) {
32 p1 = path1 + '.';
33 }
34
35 if (isEmpty(p1)) {
36 return path2;
37 } else if (isEmpty(path2)) {
38 return p1;
39 } else {
40 return `${p1}${path2}`;
41 }
42};
43
44export { compose as composePaths };
45

Callers 1

composeWithUiFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…