MCPcopy
hub / github.com/prettier/prettier / printParams

Function printParams

src/language-handlebars/printer-glimmer.js:780–797  ·  view source on GitHub ↗
(path, print)

Source from the content-addressed store, hash-verified

778}
779
780function printParams(path, print) {
781 const { node } = path;
782 const parts = [];
783
784 if (node.params.length > 0) {
785 parts.push(...path.map(print, "params"));
786 }
787
788 if (node.hash?.pairs.length > 0) {
789 parts.push(print("hash"));
790 }
791
792 if (parts.length === 0) {
793 return "";
794 }
795
796 return join(line, parts);
797}
798
799function printBlockParams(node) {
800 return ["as |", node.blockParams.join(" "), "|"];

Callers 4

printOpenBlockFunction · 0.85
printElseIfBlockFunction · 0.85
printPathAndParamsFunction · 0.85

Calls 3

joinFunction · 0.90
printFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…