MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / joinParams

Function joinParams

src/lib/console.js:413–425  ·  view source on GitHub ↗
(params, type)

Source from the content-addressed store, hash-verified

411 }
412
413 function joinParams(params, type) {
414 let parameter = "(";
415 params.map(
416 (param) =>
417 (parameter +=
418 param.type === "RestElement"
419 ? "..." + param.argument.name
420 : param.name + ","),
421 );
422 parameter = parameter.replace(/,$/, "");
423 parameter += ")" + (type === "arrow" ? "=>" : "") + "{...}";
424 return parameter;
425 }
426
427 return str;
428 }

Callers 1

parseFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected