Skip to content
Snippets Groups Projects
Commit ac50e73e authored by Callum Herries's avatar Callum Herries
Browse files

Refactor formatFunction

parent cf39634e
No related merge requests found
......@@ -111,9 +111,7 @@ function formatFunction([fn, ...args], options) {
}
const formattedName = getExpressionName(fn);
const formattedArgs = args.map(arg => format(arg, options));
return args.length === 0
? formattedName + "()"
: `${formattedName}(${formattedArgs.join(", ")})`;
return `${formattedName}(${formattedArgs.join(", ")})`;
}
function formatOperator([op, ...args], options) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment