MCPcopy Index your code
hub / github.com/nodejs/node / combine

Function combine

test/fixtures/snapshot/typescript.js:1176–1186  ·  view source on GitHub ↗
(xs, ys)

Source from the content-addressed store, hash-verified

1174 }
1175 ts.append = append;
1176 function combine(xs, ys) {
1177 if (xs === undefined)
1178 return ys;
1179 if (ys === undefined)
1180 return xs;
1181 if (isArray(xs))
1182 return isArray(ys) ? concatenate(xs, ys) : append(xs, ys);
1183 if (isArray(ys))
1184 return append(ys, xs);
1185 return [xs, ys];
1186 }
1187 ts.combine = combine;
1188 /**
1189 * Gets the actual offset into an array for a relative offset. Negative offsets indicate a

Callers 1

Calls 3

concatenateFunction · 0.85
isArrayFunction · 0.70
appendFunction · 0.70

Tested by

no test coverage detected