* Remove whitespace generation and rely on default printing Changes to printing: * Add newline after last empty SwitchCase * Add newlines around block comments if they are non-flow comments or contain newlines * Fix a few more fixtures
11 lines
243 B
JavaScript
11 lines
243 B
JavaScript
let oneOf = function () {
|
|
for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
|
|
nodes[_key] = arguments[_key];
|
|
}
|
|
|
|
if (nodes.length === 1) {
|
|
return nodes[0];
|
|
}
|
|
|
|
return new OneOfNode(nodes);
|
|
}; |