MCPcopy
hub / github.com/benjamn/recast / printArgumentsList

Function printArgumentsList

lib/printer.ts:2816–2831  ·  view source on GitHub ↗
(path: any, options: any, print: any)

Source from the content-addressed store, hash-verified

2814}
2815
2816function printArgumentsList(path: any, options: any, print: any) {
2817 const printed = path.map(print, "arguments");
2818 const trailingComma = util.isTrailingCommaEnabled(options, "parameters");
2819
2820 let joined = fromString(", ").join(printed);
2821 if (joined.getLineLength(1) > options.wrapColumn) {
2822 joined = fromString(",\n").join(printed);
2823 return concat([
2824 "(\n",
2825 joined.indent(options.tabWidth),
2826 trailingComma ? ",\n)" : "\n)",
2827 ]);
2828 }
2829
2830 return concat(["(", joined, ")"]);
2831}
2832
2833function printFunctionParams(path: any, options: any, print: any) {
2834 const fun = path.getValue();

Callers 1

genericPrintNoParensFunction · 0.85

Calls 6

fromStringFunction · 0.90
concatFunction · 0.90
mapMethod · 0.80
joinMethod · 0.80
getLineLengthMethod · 0.80
indentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…