MCPcopy
hub / github.com/prettier/prettier / group

Function group

src/document/builders/group.js:22–33  ·  view source on GitHub ↗

@param {Doc} contents @param {GroupOptions} [options] @returns {Group}

(contents, options = {})

Source from the content-addressed store, hash-verified

20@returns {Group}
21*/
22function group(contents, options = {}) {
23 assertDoc(contents);
24 assertDocArray(options.expandedStates, /* optional */ true);
25
26 return {
27 type: DOC_TYPE_GROUP,
28 id: options.id,
29 contents,
30 break: Boolean(options.shouldBreak),
31 expandedStates: options.expandedStates,
32 };
33}
34
35/**
36@param {Doc[]} states

Callers 15

embedFunction · 0.90
genericPrintFunction · 0.90
printVueVForDirectiveFunction · 0.90
createAttributePrinterFunction · 0.90
formatAttributeValueFunction · 0.90
printAngularIcuCaseFunction · 0.90
printElementFunction · 0.90
printTagFunction · 0.90
printChildrenFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…